breakdown of memory usage

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 098.

Moderator: POL Developer

Post Reply
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

breakdown of memory usage

Post by xeon »

I'm posting from cell so not yet checked
Is there a way to have a breakdown of how Pol is using the memory it has allocated? I would like to optimize my memory usage, to reduce consequently it if possible.
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: breakdown of memory usage

Post by Turley »

PolCore().internal(2) will log the current memory usage in the log file memoryusage.log, it's a simple CSV file.
To also get the usage of most of our strings you need to also build the core with DEBUG_FLYWEIGHT defined.
Note: this is only a estimation, padding and alignment stuff is not considered. And of course no guarantee of completeness.

Content is ( without DEBUG_FLYWEIGHT defined):
Time ;ProcessSize ;GameStateSize ;RealmSize ;SystemStateSize ;MultiBufferSize ;SettingsSize ;StateSize ;ScriptCount ;ScriptSize ;ScriptStoreCount ;ScriptStoreSize ;ConfigCount ;ConfigSize ;DataStoreCount ;DataStoreSize ;ConfigBufferSize ;AccountCount ;AccountSize ;ClientCount ;ClientSize ;NetworkSize ;ObjectStorage ;ObjItemCount ;ObjItemSize ;ObjContCount ;ObjContSize ;ObjCharCount ;ObjCharSize ;ObjNpcCount ;ObjNpcSize ;ObjWeaponCount ;ObjWeaponSize ;ObjArmorCount ;ObjArmorSize ;ObjMultiCount ;ObjMultiSize

Thus who can easily calculate the mean usage per object.
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: breakdown of memory usage

Post by xeon »

Mmm is there a minimum Pol099 version for this?

I tried running
Polcore().internal(2)

and it returns
1

But I do not have any memoryusage.log generated. I've not built with DEBUG_FLYWEIGHT
Turley
POL Developer
Posts: 670
Joined: Sun Feb 05, 2006 4:45 am

Re: breakdown of memory usage

Post by Turley »

It started with a first commit (c5e9f58) on Jun 02, 2014 to measure the upcoming improvements.
Post Reply