[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua's memory management was RE: Lua's GC
- From: paul@...
- Date: Tue, 11 Jun 2002 23:33:18 +0800
On Mon, Jun 10, 2002 at 11:49:53AM -0700, Pyrogon Public wrote:
> The obvious solution to this problem is to make sure that all internal
> references are indirect (i.e. a table identifier is NOT just a memory
> address) so that compaction can be done trivially. Is this what Lua
> does right now, or am I completely confused on this subject?
I believe Lua has more to care about in GC besides object
references, string, udata, closure and functions are all handled
differently. And yes, they are all direct memory pointers.
There are good memory allocators that just replace malloc &
free, but they may not provide specific functionalities like
what you have mentioned though.