HeapAlloc
E724272
HeapAlloc is a Windows API function that allocates a block of memory from a specified heap and returns a pointer to the allocated region.
Statements (48)
| Predicate | Object |
|---|---|
| instanceOf |
Windows API function
ⓘ
heap management function ⓘ |
| allocatesFrom | specified heap handle ⓘ |
| allocationGranularity | bytes as requested in dwBytes ⓘ |
| applicableTo | process heaps ⓘ |
| availability |
Windows Server
NERFINISHED
ⓘ
Windows subsystem for Windows Store apps (with restrictions) NERFINISHED ⓘ desktop Windows ⓘ |
| belongsToLibrary | Kernel32.dll NERFINISHED ⓘ |
| callingConvention | WINAPI ⓘ |
| category | dynamic memory allocation ⓘ |
| contrastWith |
GlobalAlloc
ⓘ
LocalAlloc NERFINISHED ⓘ malloc ⓘ |
| declaredIn | heapapi.h ⓘ |
| documentationSite | Microsoft Learn NERFINISHED ⓘ |
| errorReporting | GetLastError ⓘ |
| exportedBy | Kernel32.dll NERFINISHED ⓘ |
| failsIf |
insufficient heap memory
ⓘ
invalid heap handle ⓘ |
| flag |
HEAP_GENERATE_EXCEPTIONS
ⓘ
HEAP_NO_SERIALIZE ⓘ HEAP_ZERO_MEMORY ⓘ |
| introducedIn | Win32 API NERFINISHED ⓘ |
| memoryOwnership | caller must free with HeapFree ⓘ |
| namespace | global Win32 API namespace ⓘ |
| parameter |
DWORD dwFlags
ⓘ
HANDLE hHeap ⓘ SIZE_T dwBytes ⓘ |
| partOf | Windows heap management API NERFINISHED ⓘ |
| requires | valid heap handle ⓘ |
| requiresHeader | windows.h ⓘ |
| returns | pointer to allocated memory block ⓘ |
| returnsOnFailure | NULL ⓘ |
| returnType | LPVOID ⓘ |
| securityConsideration |
caller must avoid buffer overflows
ⓘ
pointer must be validated before use ⓘ |
| supports | variable-size allocations ⓘ |
| targetPlatform | Microsoft Windows NERFINISHED ⓘ |
| threadSafety | synchronized by default unless HEAP_NO_SERIALIZE is specified ⓘ |
| usedFor | manual heap management in Windows applications ⓘ |
| usedInLanguage |
C
NERFINISHED
ⓘ
C++ NERFINISHED ⓘ |
| usedWith |
GetProcessHeap
NERFINISHED
ⓘ
HeapCreate ⓘ HeapDestroy ⓘ HeapFree ⓘ HeapReAlloc NERFINISHED ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.