简体   繁体   中英

When/why should heapmin be used?

A customer has some memory usage requirements of our application. They note that while our committed memory is reasonable, the reserved memory is high. They suspect this is because the CRT heap grows as we allocate memory, but the CRT isn't returning pages to the OS when the memory is deallocated. We are just using built-in operator new/delete/new[]/delete[] - along with a little usage of malloc/free.

They ask, "Does your memory manager call _heapmin at some point to compact the heap?"

ummm, we don't explicitly call _heapmin. Should we? Are there any rules of thumb for its use?

当您使用CRT内存管理器时,无需显式调用它,操作系统将对此进行管理。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM