According to this article, CRT uses separate heap (is it private heap?), but this little example shows that CRT heap and Default heap are the same:
HANDLE heaps[64];
DWORD heapCount = GetProcessHeaps(64, heaps);
for (int i = 0; i<heapCount; i++)
printf("heap %d : [0x%x]
", i, heaps[i]);
printf("crt heap[0x%x], default heap[0x%x]
", _get_heap_handle(), GetProcessHeap());
In what cases GetProcessHeap and _get_heap_handle return different handles?
// Compiled with VS2012 (Platform toolset v110)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…