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: 333
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

breakdown of memory usage

Post by xeon » Tue Jan 03, 2017 11:04 am

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.
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

Turley
POL Developer
Posts: 646
Joined: Sun Feb 05, 2006 4:45 am

Re: breakdown of memory usage

Post by Turley » Tue Jan 03, 2017 10:11 pm

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: 333
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy
Contact:

Re: breakdown of memory usage

Post by xeon » Wed Jan 04, 2017 6:26 am

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
Scripter Xeon | Zulu Hotel Italia 7th Age | www.zhi.it
Image

Turley
POL Developer
Posts: 646
Joined: Sun Feb 05, 2006 4:45 am

Re: breakdown of memory usage

Post by Turley » Wed Jan 04, 2017 11:17 am

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

Post Reply