UGX-Mods

Call of Duty 5: World at War => Tutorial Desk => Modding => Topic started by: DidUknowiPwn on October 08, 2015, 01:18:21 am

Title: Determining memory usage
Post by: DidUknowiPwn on October 08, 2015, 01:18:21 am
Ever wondered how much memory you had left in your map before it all went to shit started crashing?

Type meminfo into console to see a detailed usage if your mods memory.

World at War has a default memory allocation of 0x12C00000 which, in decimal, is 314572800 bytes (314.5728 MB).
If you surpass this limit you'd get a memory allocation error ("Memory allocation failed. %d bytes, %d align").

Basically physical memory in World at War is taken up when a new asset is loaded. These assets are only loaded from FastFiles which is why meminfo only prints out the usage in FastFiles (apart from the default ones that are loaded by exe, $init).

Example output:
NOTE: The usages will obviously be different based on the mod and a side-note about the free physical, T4M increases the limit. Stock World at War will have 111MB less to use than what T4M offers.
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FozFfPQg.png&hash=0beec8002a24afebcff26df1ab0eeace5bcf22f8)
Title: Re: Determining memory usage
Post by: MakeCents on October 08, 2015, 01:54:41 am
Okay, super duper cool, um, but what does this mean?

Orbit, where I got a physical mem error once already:
Code Snippet
Plaintext
]meminfo
10485760 bytes total hunk

  439648 low permanent

  335424 high permanent

  775072 total hunk in use
$init               10.3
common              41.5
patch                2.1
nazi_zombie_orbit_   1.3
free physical        7.2
nazi_zombie_orbit  136.8
localized_nazi_zom  10.7
mod                 89.1
code_post_gfx        1.1
------------------------


here is a fairly empty map

Code Snippet
Plaintext
]meminfo
10485760 bytes total hunk

  411372 low permanent

     864 high permanent

  412236 total hunk in use
$init               10.3
common              41.5
patch                2.1
nazi_zombie_bwc_pa   1.3
free physical      143.0
nazi_zombie_bwc     59.4
mod                 41.4
code_post_gfx        1.1
------------------------

Do you add them and then subtract free physical? Or basically just use free physical as what you have available? Is high permanent telling me anything?
Title: Re: Determining memory usage
Post by: DidUknowiPwn on October 08, 2015, 02:34:15 am
HunkAlloc is allocated memory. It's for swapping low/high memory based on memory fragmentation.
Title: Re: Determining memory usage
Post by: KDXDARK on October 08, 2015, 04:16:15 am
this is my current map, its bad or OK?
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FSUV6lNM.png&hash=9f69a575f48246bb751bb96bf81cd6a3dc99bc57)