STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

COM Memory Functions
[COMSTL]

These functions expand on the COM API's CoTaskMem*() suite of functions. More...

Functions

ULONG CoTaskMemGetSize (void *pv)
 Gives the size of a memory block.

cs_sint_t CoTaskMemDidAlloc (void *pv)
 Determines allocation ownership of a memory block.

void CoTaskMemHeapMinimise ()
 Minimises the heap.

void CoTaskMemHeapMinimize ()
 Minimises the heap.


Detailed Description

These functions expand on the COM API's CoTaskMem*() suite of functions.


Function Documentation

cs_sint_t CoTaskMemDidAlloc void *    pv [inline]
 

Determines allocation ownership of a memory block.

This function returns a value indicating whether a memory block was allocated by the COM task allocator, as per IMalloc::DidAlloc()

Parameters:
pv  Pointer to the memory block
Returns:
Result indicating ownership
Return values:
1  The memory block was allocated by the task allocator
0  The memory block was not allocated by the task allocator
-1  CoTaskMemDidAlloc() cannot determine whether the memory block was allocated by the task allocator

ULONG CoTaskMemGetSize void *    pv [inline]
 

Gives the size of a memory block.

This function returns the size of a memory block relative to the COM task alloctor, as per IMalloc::GetSize()

Parameters:
pv  Pointer to the memory block
Returns:
The size of the memory block (in bytes)

void CoTaskMemHeapMinimise   [inline]
 

Minimises the heap.

This function minimises the heap as much as possible by releasing unused memory to the operating system, coalescing adjacent free blocks and committing free pages, as as per IMalloc::HeapMinimize().

void CoTaskMemHeapMinimize   [inline]
 

Minimises the heap.

This function minimises the heap as much as possible by releasing unused memory to the operating system, coalescing adjacent free blocks and committing free pages, as as per IMalloc::HeapMinimize().


STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004