What is the exact difference between MEM_RESERVE and MEM_COMMIT states?

Posted by pj4533 on Stack Overflow See other posts from Stack Overflow or by pj4533
Published on 2010-03-30T15:07:56Z Indexed on 2010/03/30 15:13 UTC
Read the original article Hit count: 402

Filed under:
|
|
|

As I understand it MEM_RESERVE is actually 'free' memory, ie available to be used by my process, but just hasn't been allocated yet? Or it was previously allocated, but had since been freed?

Specifically, see in my !address output below how I am nearly out of virtual address space (99900 KB free, 2307872 as MEM_PRIVATE. But the states shows that 44.75% of that is actually MEM_RESERVE. Does that mean it is actually free, in my process...but maybe fragmented?

0:000> !address -summary
 --------- PEB a8bd8000 not found ----

-------------------- Usage SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots) Pct(Busy)   Usage
   259af000 (  616124) : 22.29%    23.12%    : RegionUsageIsVAD
    618f000 (   99900) : 03.61%    00.00%    : RegionUsageFree
   13e22000 (  325768) : 11.78%    12.22%    : RegionUsageImage
   42c04000 ( 1093648) : 39.56%    41.04%    : RegionUsageStack
     42d000 (    4276) : 00.15%    00.16%    : RegionUsageTeb
   2625d000 (  625012) : 22.61%    23.45%    : RegionUsageHeap
          0 (       0) : 00.00%    00.00%    : RegionUsagePageHeap
          0 (       0) : 00.00%    00.00%    : RegionUsagePeb
       1000 (       4) : 00.00%    00.00%    : RegionUsageProcessParametrs
       1000 (       4) : 00.00%    00.00%    : RegionUsageEnvironmentBlock
       Tot: a8bf0000 (2764736 KB) Busy: a2a61000 (2664836 KB)

-------------------- Type SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots)  Usage
    618f000 (   99900) : 03.61%   : <free>
   13e22000 (  325768) : 11.78%   : MEM_IMAGE
    1e77000 (   31196) : 01.13%   : MEM_MAPPED
   8cdc8000 ( 2307872) : 83.48%   : MEM_PRIVATE

-------------------- State SUMMARY --------------------------
    TotSize (      KB)   Pct(Tots)  Usage
   57235000 ( 1427668) : 51.64%   : MEM_COMMIT
    618f000 (   99900) : 03.61%   : MEM_FREE
   4b82c000 ( 1237168) : 44.75%   : MEM_RESERVE

Largest free region: Base 7e4a1000 - Size 000ff000 (1020 KB)

© Stack Overflow or respective owner

Related posts about memory

Related posts about memory-usage