[Gc] Allocating Executable Memory
hans.boehm at hp.com
Mon Jul 26 13:59:52 PDT 2010
> From: Ivan Maidanski
> Sent: Saturday, July 24, 2010 3:05 AM
> To: Andrew Haley
> Cc: Noah Lavine; gc at linux.hpl.hp.com
> Subject: Re: [Gc] Allocating Executable Memory
> Okey. Another patch is needed which adjust the method how mmaping is
> If I understand correctly, we just need to duplicate all relevant mmap
> and munmap calls (RW + E), right?
> If yes, we also need some config option to enable this feature
> (otherwise retain old behavior).
> Probably, we don't need to turn it on on Solaris.
> Hans -
> what do you think?
I wonder whether the right solution here isn't to replace the GET_MEM mechanism by an indirect function call, and to allow clients with unusual requirements or constraints to replace it. If we do this, I think we need to keep the current implementations as the default behavior of that function. (Maybe we could just syntactically rename GET_MEM by DEFAULT_GET_MEM, and have the default version of that function call DEFAULT_GET_MEM. That's probably not optimal.)
If we actually need to double map, we should probably give the client control over to place the second mapping, etc. And IIRC, there at least used to be some machines that really don't like double-mapped memory.
More information about the Gc