Oharra
Orrialde honetara sartzeak baimena behar du. Saioa hasteko edo direktorioak aldatzen saia zaitezke.
Orrialde honetara sartzeak baimena behar du. Direktorioak aldatzen saia zaitezke.
Devuelve el identificador del montón usado por el sistema en tiempo de ejecución de C.
Sintaxis
intptr_t _get_heap_handle( void );
Valor devuelto
Devuelve el identificador del montón de Win32 usado por el sistema en tiempo de ejecución de C.
Comentarios
Use esta función si desea llamar HeapSetInformation a y habilitar el montón de fragmentación baja en el montón de CRT.
De manera predeterminada, el estado global de esta función está limitado a la aplicación. Para cambiar este comportamiento, consulte Estado global en CRT.
Requisitos
| Routine | Encabezado necesario |
|---|---|
_get_heap_handle |
<malloc.h> |
Para obtener más información sobre compatibilidad, consulte Compatibilidad.
Ejemplo
// crt_get_heap_handle.cpp
// compile with: /MT
#include <windows.h>
#include <malloc.h>
#include <stdio.h>
int main(void)
{
intptr_t hCrtHeap = _get_heap_handle();
ULONG ulEnableLFH = 2;
if (HeapSetInformation((PVOID)hCrtHeap,
HeapCompatibilityInformation,
&ulEnableLFH, sizeof(ulEnableLFH)))
puts("Enabling Low Fragmentation Heap succeeded");
else
puts("Enabling Low Fragmentation Heap failed");
return 0;
}