C /C + + Compiler
Microsoft Windows
Mostrar más instrucciones
1
Crear un objeto del montón a través de la función " HeapCreate ":
MANGO hHeap HeapCreate = ( 0 , 0, 0 ) ;
2
asignar un bloque de memoria en el montón con la función " HeapAlloc ":
tamaño int = NumberOfPages * sizeof ( ULONG_PTR ) ;
ULONG_PTR hPointer = ( ULONG_PTR *) HeapAlloc ( hHeap , 0 , tamaño) ;
3
Obtener el tamaño del bloque de memoria con la función HEAPSIZE :
SIZE_T hsize = HEAPSIZE ( hHeap , 0, hPointer ) ;