diff options
Diffstat (limited to '3rdparty/portaudio/src/common/pa_allocation.c')
-rw-r--r-- | 3rdparty/portaudio/src/common/pa_allocation.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/3rdparty/portaudio/src/common/pa_allocation.c b/3rdparty/portaudio/src/common/pa_allocation.c index 51fe15aba8c..f77712ba6de 100644 --- a/3rdparty/portaudio/src/common/pa_allocation.c +++ b/3rdparty/portaudio/src/common/pa_allocation.c @@ -27,13 +27,13 @@ */ /* - * The text above constitutes the entire PortAudio license; however, + * The text above constitutes the entire PortAudio license; however, * the PortAudio community also makes the following non-binding requests: * * Any person wishing to distribute modifications to the Software is * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the + * they can be incorporated into the canonical version. It is also + * requested that these non-binding requests be included along with the * license above. */ @@ -78,8 +78,8 @@ static struct PaUtilAllocationGroupLink *AllocateLinks( long count, { struct PaUtilAllocationGroupLink *result; int i; - - result = (struct PaUtilAllocationGroupLink *)PaUtil_AllocateMemory( + + result = (struct PaUtilAllocationGroupLink *)PaUtil_AllocateZeroInitializedMemory( sizeof(struct PaUtilAllocationGroupLink) * count ); if( result ) { @@ -95,7 +95,7 @@ static struct PaUtilAllocationGroupLink *AllocateLinks( long count, } result[count-1].next = nextSpare; } - + return result; } @@ -109,7 +109,8 @@ PaUtilAllocationGroup* PaUtil_CreateAllocationGroup( void ) links = AllocateLinks( PA_INITIAL_LINK_COUNT_, 0, 0 ); if( links != 0 ) { - result = (PaUtilAllocationGroup*)PaUtil_AllocateMemory( sizeof(PaUtilAllocationGroup) ); + result = (PaUtilAllocationGroup*)PaUtil_AllocateZeroInitializedMemory( + sizeof(PaUtilAllocationGroup) ); if( result ) { result->linkCount = PA_INITIAL_LINK_COUNT_; @@ -143,11 +144,11 @@ void PaUtil_DestroyAllocationGroup( PaUtilAllocationGroup* group ) } -void* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size ) +void* PaUtil_GroupAllocateZeroInitializedMemory( PaUtilAllocationGroup* group, long size ) { struct PaUtilAllocationGroupLink *links, *link; void *result = 0; - + /* allocate more links if necessary */ if( !group->spareLinks ) { @@ -163,7 +164,7 @@ void* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size ) if( group->spareLinks ) { - result = PaUtil_AllocateMemory( size ); + result = PaUtil_AllocateZeroInitializedMemory( size ); if( result ) { link = group->spareLinks; @@ -176,7 +177,7 @@ void* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size ) } } - return result; + return result; } @@ -208,7 +209,7 @@ void PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer ) break; } - + previous = current; current = current->next; } @@ -240,4 +241,3 @@ void PaUtil_FreeAllAllocations( PaUtilAllocationGroup* group ) group->allocations = 0; } } - |