[MUD-Dev] [TECH] String Classes, Memory Management, and Fragm entation

Bruce Mitchener bruce at puremagic.com
Wed Jul 11 01:22:28 New Zealand Standard Time 2001


Daniel.Harman at barclayscapital.com wrote:
>>-----Original Message-----
>>From: Derek Licciardi [mailto:derek at elysianonline.com]

>> Been pondering multiple ways to solve the issue of Heap
>> management and the string issue is a thorn in my side.

> Well I don't work on on MUD, but its a standard C++ programming
> pattern (I'm assuming you are using C++). Why would you buy a
> third party heap manager when you could just write your own?

One reason against writing your own is that there are already a
number of interesting implementations of this sort of thing. :) It
is a pretty well researched field.  Is it worth the effort of
re-inventing?  Or are the gains that you foresee something that will
be worth the extra cost in time and maintenance?

Depending on your goals, the standard BSD 4.4 allocator, the PHK
allocator from FreeBSD, the Hoard allocator [1], the Heap Layers
work [2], Doug Lea's dlmalloc [3], and so forth all have different
trade offs.

There is also the ColdStore project which explicitly attempts to
allocate things in neighborhoods to maximize locality of
reference. [4]

Also, as part of work on reducing the footprint of Mozilla, there
was some work done comparing a couple of allocators and how they
treated the heap, both in terms of the amount of heap space consumed
and the performance impact. [5]

Finally, there's a lot of interesting information in the Xanalys
Memory Management Reference [6].  That is the most complete
reference that I'm aware of on the subject. :)


  - Bruce

[1] Hoard: http://www.cs.utexas.edu/users/emery/hoard/
[2] HeapLayers: http://www.heaplayers.org/
[3] dlmalloc: http://g.oswego.edu/dl/html/malloc.html
[4] ColdStore: http://coldstore.sf.net/
[5] Mozilla allocator work:
     http://www.mozilla.org/projects/footprint/allocators.html
[6] Xanalys Memory Management Reference:
     http://www.xanalys.com/software_tools/mm/index.html

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list