HeapAlloc v0.1.0

Source
Allocates a block from a Win32 heap.

Package: Windows

Microsoft documentation: HeapAlloc

Signature

func HeapAlloc(
    heap: *opaque,
    flags: uint32,
    bytes: uint
) -> *var opaque;

Parameters

NameDescription
heapHeap handle returned by GetProcessHeap.
flagsWin32 heap flags; use 0 for default behavior.
bytesRequested allocation size.

Returns

*opaque — the allocated block, or null on failure. The memory is uninitialized unless a zero-memory flag is supplied. Release it with HeapFree using the same heap.

See also