[MUD-Dev] [Tech] Garbage collection
Lars Duening
lars at bearnip.com
Tue Sep 2 19:46:36 CEST 2003
On Monday, September 1, 2003, at 01:40 PM, Brian Hook wrote:
> I've been doing some more research into garbage collection lately
> and I'm trying to get a feel for what the current major MUD
> languages/engines use for garbage collection.
> My gut instinct is that a vanilla mark-and-sweep probably isn't
> acceptable because of hitches, so either most are using explicit
> memory management (doubtful), ref-counting (likely), or an
> incremental collector (complicated).
LDMud uses a combination of instanteneous and deferred collection:
the most deallocations are done through elaborate reference
counting, in addition the mudlib can elect to run a mark-and-sweep
collection on demand. This M&S collection is also run whenever the
memory allocator can't allocate any more memory from the system.
I sometimes wonder if it would be possible to reduce the amount of
reference counting done, as it's a constant source for errors;
however a good design would have to take into account the
short-livedness of most allocations.
--
Lars Duening; lars at bearnip.com
GPG Key: http://www.bearnip.com/lars/lars-duening.gpgkey
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list