[Home] [Groups] - Message: [Prev in Group] [Next in Group]
9869: [MUD-Dev] Re: Variable-sized structures in C (was: Naming and Directories)
[Full Header] [Plain Text]
From: Petri Virkkula <pvirkkul@iki.fi>
Newsgroups: nu.kanga.list.mud-dev
Date: Mon, 22 Mar 1999 21:31:03 +0200 (EET)
References: [1] [2] <-newest
Organization: Kanga.Nu
>>>>> "Alex" == T Alexander Popiel <popiel@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.
Petri
_______________________________________________
MUD-Dev maillist - MUD-Dev@kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev