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.
breakdown of memory usage
Moderator: POL Developer
Re: breakdown of memory usage
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.
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.
Re: breakdown of memory usage
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
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
Re: breakdown of memory usage
It started with a first commit (c5e9f58) on Jun 02, 2014 to measure the upcoming improvements.