x86 jitter

Tom tmb at lumo.com
Mon Apr 9 02:37:21 UTC 2001


On Sun, Apr 08, 2001 at 01:22:21PM -0700, Raab, Andreas wrote:
> > * If so, where does it do this? (into malloc'd memory)?
> 
> Yes.
> 
> > * If  the generation is into malloc'd memory, how do you get 
> > the OS to allow you to execute instructions in malloc'd memory
> > (seems like you'd have to fiddle with the x86 segment flags to
> > get this to work)?
> 
> You don't. By default malloc()ed memory is executable on both, Linux and
> Win32 (probably because self-modifying code is sooo much fun).

Howver, if you ever free or garbage collect that memory, you have to
flush the instruction cache, or you are going to get some very strange,
very intermittent bugs.

Cheers,
Thomas.





More information about the Squeak-dev mailing list