_HeapGetSize


// C syntax
#include <vmm.h>

ULONG EXTERNAL _HeapGetSize(ULONG hAddress, ULONG flags);

; assembler syntax
include vmm.inc

VMMcall _HeapGetSize, <hAddress, flags>

or      eax, eax        ; zero if error
jz      error
mov     [Size], eax     ; size in byte of memory block

Returns the size, in bytes, of an existing block in the system heap. Uses EAX, ECX, EDX, and Flags.

hAddress

Address of the memory block. This address must have been previously returned by the _HeapAllocate or _HeapReAllocate service.

flags

Operation flags. Must be 0.

Although the system can usually recover from an attempt to get the size of an invalid address, you should not rely on this.

See also _HeapAllocate