Re: [Gc] Allocating Executable Memory

Ivan Maidanski ivmai at mail.ru
Tue Jun 8 20:54:17 PDT 2010


Hi!

To my knowledge, libgc allocates executable memory unless -D NO_EXECUTE_PERMISSION is set.

Making libgc dealing with pools is hard (IMHO). But it would be nice to have such feature (I've recently considered a multi-threaded application in which one thread could accidentally grab all available memory terminating the application - having per-thread pools seems to be a good solution for it as OutOfMem will be thrown exactly in that bad thread.)

Hans -
could you express your opinion, please?

Tue, 8 Jun 2010 17:33:26 -0400 Noah Lavine <noah.b.lavine at gmail.com>:

> Dear libgc developers,
> 
> I'm interested in managing executable memory with libgc, as part of a
> project to add a JIT compilation system to Guile Scheme. As far as I
> can tell, libgc does not currently support this. It seems like the
> cleanest way for Guile to do this is to add functions to libgc to
> request that allocated memory be executable, and perhaps have libgc
> manage the executable memory as a separate pool than the
> non-executable.
> 
> If possible, I'd like to work with you to find a way to make these
> modifications that could be included in the main libgc, both for the
> maintenance benefits to Guile and to help libgc. Therefore I'd like to
> ask you, is there a way that you would be interested in adding
> executable memory support to libgc? It seems to me that the cleanest
> approach might be to add support for allocating memory from arbitrary
> pools, given a user-supplied function that would allocate more memory
> in this pool. Then a user could provide a function to allocate an
> executable memory page, a file-mapped page, or whatever else. However,
> I certainly understand libgc much less than you do. Does this seem
> like a good idea? Is there a way that could work?
> 
> Thanks
> Noah Lavine


More information about the Gc mailing list