MacOS X, memory layout

Sébastien Carlier sebc@posse42.net
Mon, 3 Dec 2001 13:57:41 +0100


--Apple-Mail-3--987709920
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed


In order to implement Plan C in ghc/rts/Storage.h:443:
>   Hence, Plan C: (unregisterised, compile-through-vanilla-C route =
only)
>     If we didn't manage to get info tables into the text section, then
>     we can distinguish between a static closure pointer and an info
>     pointer as follows:  the first word of an info table is a code=20
> pointer,
>     and therefore in text space, whereas the first word of a closure=20=

> pointer
>     is an info pointer, and therefore not.  Shazam!

I need to move the entry code pointer to the start of info tables.
I'm a bit uncomfortable with committing this change, as it will
require everyone to recompile everything.
Should I
- boldly commit, with the proper notice that all code must be
   recompiled ?
- guard the change in a #if block so that it is only active on OS X ?

--
S=E9bastien

--Apple-Mail-3--987709920
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=ISO-8859-1


In order to implement Plan C in ghc/rts/Storage.h:443:

<excerpt><color><param>0000,0000,DEDE</param>  Hence, Plan C:
(unregisterised, compile-through-vanilla-C route only)

    If we didn't manage to get info tables into the text section, then

    we can distinguish between a static closure pointer and an info

    pointer as follows:  the first word of an info table is a code
pointer,

    and therefore in text space, whereas the first word of a closure
pointer

    is an info pointer, and therefore not.  Shazam!

</color></excerpt>

I need to move the entry code pointer to the start of info tables.

I'm a bit uncomfortable with committing this change, as it will

require everyone to recompile everything.

Should I

- boldly commit, with the proper notice that all code must be

  recompiled ?

- guard the change in a #if block so that it is only active on OS X ?


--

S=E9bastien


--Apple-Mail-3--987709920--