HeapCreate()中的可增长堆 [英] Growable heaps within HeapCreate()
问题描述
I'm having a hard time trying to understand the following statement in the HeapCreate() docs :
"如果 dwMaximumSize 为0,则堆的大小可以增加.堆的大小仅受可用内存的限制.请求分配的内存块大于 固定大小的堆的 limit 不会自动失败;相反,系统会调用 VirtualAlloc 函数获取大块所需的内存.需要分配大内存块的应用程序 应该将 dwMaximumSize 设置为0."
"If dwMaximumSize is 0, the heap can grow in size. The heap's size is limited only by the available memory. Requests to allocate memory blocks larger than the limit for a fixed-size heap do not automatically fail; instead, the system calls the VirtualAlloc function to obtain the memory that is needed for large blocks. Applications that need to allocate large memory blocks should set dwMaximumSize to 0."
上面提到了 limit 吗?
推荐答案
Probably the limit is “slightly less than 512 KB for a 32-bit process and slightly less than 1,024 KB for a 64-bit process”. It is mentioned in previous paragraph.
这篇关于HeapCreate()中的可增长堆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!