lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Certainly, this was a patch to suit our specific needs. I have and am not
suggesting it as a solution for Luas GC issues. The illustration was simply
a reply to your mail that seemed to imply that reference counting techniques
are dependant on malloc and free and therefore the pitfalls of the C
allocator that makes no guarantees about latency. I think we both agree they
are not.

-----Original Message-----
From: tom7ca []
Sent: 30 October 2002 15:32
To: Multiple recipients of list
Subject: Re: Garbage collection

> Our own user data types are also under control 
> of such a memory manager. There
> is no mallocing and freeing going on while 
> the program runs. We are also
> using a pseudo reference counting system, that 
> collects incrementally so
> there is no hit for chained objects. 

Yes, this is quite common.  I have written that kind of
code, too, because in C, you simply can't do much better.

But that doesn't make it good engineering.  The kind
of allocator you describe is an inefficient, non-interoperable,
special-purpose solution.

General purpose, efficient, real-time memory management is a 
hard problem.  The problem is hard enough that it 
should be solved once in the runtime.