Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

MQe_Memory.h File Reference

API header file for the WMQe Memory functions. More...


Functions

MQERETURN mqeMemory_allocate (MQeExceptBlock *pExceptBlock, MQEVOID **ppMem, MQEUINT32 size)
 This function allocates a contiguous block of memory. The memory is private to this process.

MQERETURN mqeMemory_free (MQeExceptBlock *pExceptBlock, MQEVOID *pMem)
 This function deallocates a block of memory which has previously been allocated using mqeMemory_allocate.

MQERETURN mqeMemory_reallocate (MQeExceptBlock *pExceptBlock, MQEVOID **ppMem, MQEUINT32 size)
 This function resizes a contiguous block of memory. The memory is private to this process. The contents of the existing block are copied over to the new block.


Detailed Description


Function Documentation

MQERETURN mqeMemory_allocate MQeExceptBlock   pExceptBlock,
MQEVOID **    ppMem,
MQEUINT32    size
 

Parameters:
pExceptBlock  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
ppMem  [out] pointer to a void pointer. This parameter is used to return a pointer to the newly allocated memory.
size  [in] size of buffer required (in bytes).
Precondition:
pExceptBlock should point to a pre-allocated MQeExceptBlock structure (no error information will be returned if pExceptBlock is null).
Return values:
MQERETURN_OK  Operation successful
MQERETURN_MEMORY_ERROR 
  • MQEREASON_ALLOCATION_FAILED - Memory could not be allocated.

MQERETURN mqeMemory_free MQeExceptBlock   pExceptBlock,
MQEVOID *    pMem
 

Parameters:
pExceptBlock  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
pMem  [in] pointer to memory block to be freed.
Precondition:
pExceptBlock should point to a pre-allocated MQeExceptBlock structure (no error information will be returned if pExceptBlock is null).
Return values:
MQERETURN_OK  Operation successful
MQERETURN_MEMORY_ERROR 
  • MQEREASON_INVALID_PARAM2 - Memory could not be freed, pointer was invalid.

MQERETURN mqeMemory_reallocate MQeExceptBlock   pExceptBlock,
MQEVOID **    ppMem,
MQEUINT32    size
 

Parameters:
pExceptBlock  [in/out] pointer to a pre-allocated MQeExceptBlock structure.
ppMem  [out] pointer to a void pointer to existing memory block. On input, this parameter should contain a pointer to a previously allocated memory block. On return, the value contains a pointer to a pointer to resized block.
size  [in] size of buffer required (in bytes).
Precondition:
pExceptBlock should point to a pre-allocated MQeExceptBlock structure (no error information will be returned if pExceptBlock is null).
Return values:
MQERETURN_OK  Operation successful
MQERETURN_MEMORY_ERROR 
  • MQEREASON_INVALID_PARAM2 - Pointer to current block invalid. Memory is untouched.
  • MQEREASON_ALLOCATION_FAILED - New block could not be allocated - original block is returned unchanged.


Generated Thu Aug 11 23:41:19 2005 for Websphere MQ Everyplace for Multiplatforms C Bindings Reference