nedmalloc

Windows memory allocation questions

爱⌒轻易说出口 提交于 2019-12-12 07:27:28
问题 I am currently looking into malloc() implementation under Windows. But in my research I have stumbled upon things that puzzled me: First, I know that at the API level, windows uses mostly the HeapAlloc() and VirtualAlloc() calls to allocate memory. I gather from here that the Microsoft implementation of malloc() (that which is included in the CRT - the C runtime) basically calls HeapAlloc() for blocks > 480 bytes and otherwise manage a special area allocated with VirtualAlloc() for small

Windows memory allocation questions

ε祈祈猫儿з 提交于 2019-12-01 18:12:07
I am currently looking into malloc() implementation under Windows. But in my research I have stumbled upon things that puzzled me: First, I know that at the API level, windows uses mostly the HeapAlloc() and VirtualAlloc() calls to allocate memory. I gather from here that the Microsoft implementation of malloc() (that which is included in the CRT - the C runtime) basically calls HeapAlloc() for blocks > 480 bytes and otherwise manage a special area allocated with VirtualAlloc() for small allocations, in order to prevent fragmentation. Well that is all good and well. But then there are other