PortAudio
2.0
|
Allocation Group implementation. More...
Data Structures | |
struct | PaUtilAllocationGroupLink |
Macros | |
#define | PA_INITIAL_LINK_COUNT_ 16 |
Functions | |
PaUtilAllocationGroup * | PaUtil_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) |
Allocation Group implementation.
#define PA_INITIAL_LINK_COUNT_ 16 |
Referenced by PaUtil_CreateAllocationGroup().
PaUtilAllocationGroup* PaUtil_CreateAllocationGroup | ( | void | ) |
Create an allocation group.
References PaUtilAllocationGroup::allocations, PaUtilAllocationGroup::linkBlocks, PaUtilAllocationGroup::linkCount, PA_INITIAL_LINK_COUNT_, PaUtil_AllocateZeroInitializedMemory(), PaUtil_FreeMemory(), and PaUtilAllocationGroup::spareLinks.
Referenced by PaAlsa_Initialize(), PaAsiHpi_Initialize(), PaAsio_Initialize(), PaAudioIO_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaPulseAudio_Initialize(), PaSkeleton_Initialize(), PaWasapi_Initialize(), PaWinDs_Initialize(), PaWinMme_Initialize(), and PaWinWdm_Initialize().
void PaUtil_DestroyAllocationGroup | ( | PaUtilAllocationGroup * | group | ) |
Destroy an allocation group, but not the memory allocated through the group.
References PaUtilAllocationGroupLink::buffer, PaUtilAllocationGroup::linkBlocks, PaUtilAllocationGroupLink::next, and PaUtil_FreeMemory().
Referenced by PaAlsa_Initialize(), PaAsio_Initialize(), PaAudioIO_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaPulseAudio_Free(), PaSkeleton_Initialize(), and PaWinMme_Initialize().
void PaUtil_FreeAllAllocations | ( | PaUtilAllocationGroup * | group | ) |
Free all blocks of memory which have been allocated through the allocation group. This function doesn't destroy the group itself.
References PaUtilAllocationGroup::allocations, PaUtilAllocationGroupLink::buffer, PaUtilAllocationGroupLink::next, PaUtil_FreeMemory(), and PaUtilAllocationGroup::spareLinks.
Referenced by PaAlsa_Initialize(), PaAsio_Initialize(), PaAudioIO_Initialize(), PaJack_Initialize(), PaMacCore_Initialize(), PaOSS_Initialize(), PaPulseAudio_Free(), PaSkeleton_Initialize(), and PaWinMme_Initialize().
void* PaUtil_GroupAllocateZeroInitializedMemory | ( | PaUtilAllocationGroup * | group, |
long | size | ||
) |
Allocate a block of memory through the specified allocation group.
The allocated block is zero-initialized.
References PaUtilAllocationGroup::allocations, PaUtilAllocationGroupLink::buffer, PaUtilAllocationGroup::linkBlocks, PaUtilAllocationGroup::linkCount, PaUtilAllocationGroupLink::next, PaUtil_AllocateZeroInitializedMemory(), and PaUtilAllocationGroup::spareLinks.
Referenced by _PaPulseAudio_AddAudioDevice(), PaAsio_Initialize(), PaAudioIO_Initialize(), PaMacCore_Initialize(), PaPulseAudio_Initialize(), PaSkeleton_Initialize(), PaUtil_InitializeDeviceInfo(), PaWinDs_Initialize(), and PaWinMme_Initialize().
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.
References PaUtilAllocationGroup::allocations, PaUtilAllocationGroupLink::buffer, PaUtilAllocationGroupLink::next, PaUtil_FreeMemory(), and PaUtilAllocationGroup::spareLinks.