exip  Alpha 0.5.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
memManagement.h File Reference

Handles memory operations - allocation, deallocation etc. More...

#include "errorHandle.h"
#include "procTypes.h"

Go to the source code of this file.

Functions

errorCode initAllocList (AllocList *list)
 Initial setup of an AllocList. More...
 
void * memManagedAllocate (AllocList *list, size_t size)
 Allocate a memory block with size size and store a copy of the pointer in a linked list for freeing it at the end. More...
 
void freeAllMem (EXIStream *strm)
 Frees all the managed memory for a particular EXI stream. More...
 
void freeAllocList (AllocList *list)
 Frees a particular Allocation list. More...
 

Detailed Description

Except Data Values (Binary data, DateTime etc.), which are freed after the respective ContentHandler is called, all other allocations are freed at the end of the parsing/serializing.

Date
Oct 25, 2010
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: memManagement.h 328 2013-10-30 16:00:10Z kjussakov $

Definition in file memManagement.h.

Function Documentation

void freeAllMem ( EXIStream strm)

It should be called after an error in the processing occur or at the end of the parsing/serializing if the processing is successful. Frees the memory in the allocation list and the hashtables used.

Parameters
[in,out]strmEXI stream for which the allocations were made

Definition at line 58 of file memManagement.c.

void freeAllocList ( AllocList list)
Parameters
[in,out]listAllocation list to be freed
Returns
Error handling code

Definition at line 164 of file memManagement.c.

errorCode initAllocList ( AllocList list)
Parameters
[in,out]lista memory list to be setup
Returns
Error handling code

Definition at line 23 of file memManagement.c.

void* memManagedAllocate ( AllocList list,
size_t  size 
)
Parameters
[in,out]listA list storing the memory allocations
[in]sizethe size of the memory block to be allocated
Returns
pointer to the allocated memory if successful. NULL otherwise

Definition at line 35 of file memManagement.c.