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

Implementation of handling memory operations - allocation, deallocation etc. More...

#include "memManagement.h"
#include "hashtable.h"
#include "dynamicArray.h"
#include "sTables.h"
#include "grammars.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

Date
Oct 25, 2010
Author
Rumen Kyusakov
Version
0.5
[Revision] $Id: memManagement.c 352 2014-11-25 16:37:24Z kjussakov $

Definition in file memManagement.c.

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.