[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Forcing a GC collection from within the allocator?
- From: "Peter Cawley" <lua@...>
- Date: Sun, 24 Aug 2008 00:28:22 +0100
I'm writing a custom allocator for certain situations, which -
whenever possible - allocates memory from a pre-allocated pool instead
of calling realloc. If it were to come to the point where all of the
memory in its pool has been allocated to Lua, and it is called to
allocate a new piece of memory, can it invoke a GC collection to try
and free up some of its pool, or will causing a GC collection from
within the allocator cause all sorts of trouble?