PortAudio  2.0
Data Structures | Macros | Functions
pa_allocation.c File Reference

Allocation Group implementation. More...

#include "pa_allocation.h"
#include "pa_util.h"

Data Structures

struct  PaUtilAllocationGroupLink
 

Macros

#define PA_INITIAL_LINK_COUNT_   16
 

Functions

PaUtilAllocationGroupPaUtil_CreateAllocationGroup (void)
 
void PaUtil_DestroyAllocationGroup (PaUtilAllocationGroup *group)
 
void * PaUtil_GroupAllocateZeroInitializedMemory (PaUtilAllocationGroup *group, long size)
 
void PaUtil_GroupFreeMemory (PaUtilAllocationGroup *group, void *buffer)
 
void PaUtil_FreeAllAllocations (PaUtilAllocationGroup *group)
 

Detailed Description

Allocation Group implementation.

Macro Definition Documentation

#define PA_INITIAL_LINK_COUNT_   16

Function Documentation

PaUtilAllocationGroup* PaUtil_CreateAllocationGroup ( void  )
void PaUtil_DestroyAllocationGroup ( PaUtilAllocationGroup group)
void PaUtil_FreeAllAllocations ( PaUtilAllocationGroup group)
void* PaUtil_GroupAllocateZeroInitializedMemory ( PaUtilAllocationGroup group,
long  size 
)
void PaUtil_GroupFreeMemory ( PaUtilAllocationGroup group,
void *  buffer 
)

Free a block of memory that was allocated through the specified allocation group. Calling this function is a relatively time consuming operation. Under normal circumstances clients should call PaUtil_FreeAllAllocations to free all allocated blocks simultaneously.

See Also
PaUtil_FreeAllAllocations

References PaUtilAllocationGroup::allocations, PaUtilAllocationGroupLink::buffer, PaUtilAllocationGroupLink::next, PaUtil_FreeMemory(), and PaUtilAllocationGroup::spareLinks.