IMalloc::DidAlloc
A version of this page is also available for
4/8/2010
This method determines whether this allocator was used to allocate the specified block of memory.
Syntax
int DidAlloc(
void* pv
);
Parameters
- pv
[in] Pointer to the memory block; can be a NULL pointer, in which case, -1 is returned.
Return Value
The following table shows the return values for this method.
Value | Description |
---|---|
1 |
The memory block was allocated by this IMalloc instance. |
0 |
The memory block was not allocated by this IMalloc instance. |
-1 |
IMalloc::DidAlloc is unable to determine whether or not it allocated the memory block. |
Remarks
Calling IMalloc::DidAlloc is useful if an application is using multiple allocations and needs to know whether a previously allocated block of memory was allocated by a particular allocation.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
Header | objidl.h, objidl.idl |
Library | ole32.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IMalloc
IMalloc::Alloc
IMalloc::HeapMinimize
IMalloc::Realloc