_HeapGetSize

include vmm.inc

VMMcall _HeapGetSize, <hAddress, flags>

or eax, eax ; zero if error

jz error

mov [Size], eax ; size in byte of memory block


The _HeapGetSize service returns the size (in bytes) of an existing block of heap.

Parameters

hAddress

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

flags

Specifies the operation flags. This parameter must be set to 0.

Return Value

The EAX register contains the size (in bytes) of the block if the service is successful. Otherwise, EAX contains zero to indicate an error such as an invalid address.

Uses

EAX

See Also

_HeapAllocate