[MUD-Dev] Re: Variable-sized structures in C (was: Naming and Directories)

Petri Virkkula pvirkkul at iki.fi
Mon Mar 22 21:31:03 New Zealand Daylight Time 1999

>>>>> "Alex" == T Alexander Popiel <popiel at snugharbor.com> writes:

Alex> code to any who want it).  The string table is used for attribute
Alex> names on the objects, to eliminate duplication of the same name
Alex> on multiple objects through shared storage of the name.  This
Alex> has yielded 50% storage reduction over naive duplication and
Alex> 30% storage reduction over duplicating all but a known set of
Alex> common names (the current policy in the server) in tests using
Alex> the pre-closing DuneMUSH database.  (Of course, the overall
Alex> memory usage only went down a few percent, because the names
Alex> are generally smaller than the contents, but even 5% on 40 meg
Alex> is nice.)

	You can save lots of memory if you use shared strings
	everywhere, see these statistics:

--- cut here ---
        Driver status string
                                 Strings    Bytes
Strings malloced                  363718 14476032 + 2382392 overhead
Total asked for                 -39490240 604628036
Space actually required/total string bytes 2%
Searches: 610985845    Average search length:   1.347
Longest shared string so far: 24384
--- cut here ---

	Instead of using 577MB for strings, the driver uses only 16M
	for them.


MUD-Dev maillist  -  MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list