c++ - what could be reason for virtual bytes to grow 2x private bytes? -
The virtual byte of an application increases private times 2 times.
Does this show a memory leak? Bad app design?
OS 32 bit
Any idea is welcome Application Stream Database
Fragmentation.
If you allocate the following sections of the memory:
And then You release part of 8KB, 32 KB private bytes in your application, but 40 KB bytes of virtual memory, which is actually the highest virtual memory address that your process (by ignoring other memory parties for simplicity) Has been in use.
Consider some options using another memory manager (if possible):
- Windows Lo-framation pile (see for more information)
- Doug-Lee open source memory manager
- Like commercial choice hoard
The fourth option is to write your own memory manager, it is not easy, but If done right, then there may be some benefits in it, especially in specific places or special applications For, writing your own memory manager can be useful.
Comments
Post a Comment