IMalloc::GetSize method
Retrieves the size of a previously allocated block of memory.
Syntax
SIZE_T GetSize( [in] void *pv );
Parameters
- pv [in]
-
A pointer to the block of memory.
Return value
The size of the allocated memory block in bytes or, if pv is a NULL pointer, -1.
Remarks
To get the size in bytes of a memory block, the block must have been previously allocated with IMalloc::Alloc or IMalloc::Realloc. The size returned is the actual size of the allocation, which may be greater than the size requested when the allocation was made.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IMalloc is defined as 00000002-0000-0000-C000-000000000046 |
See also
Show: