add type-specific allocators

This commit is contained in:
Josh Coalson
2001-05-13 05:15:47 +00:00
parent d8deb2cd21
commit 02f39006a3
2 changed files with 97 additions and 2 deletions

View File

@@ -22,9 +22,15 @@
#include <stdlib.h> /* for size_t */
#include "FLAC/ordinals.h" /* for bool */
/* Returns the unaligned address returned by malloc.
* Use free() on this address to deallocate.
*/
void *FLAC__memory_alloc(size_t bytes, void **aligned_address);
void *FLAC__memory_alloc_aligned(size_t bytes, void **aligned_address);
bool FLAC__memory_alloc_aligned_int32_array(unsigned elements, int32 **unaligned_pointer, int32 **aligned_pointer);
bool FLAC__memory_alloc_aligned_uint32_array(unsigned elements, uint32 **unaligned_pointer, uint32 **aligned_pointer);
bool FLAC__memory_alloc_aligned_unsigned_array(unsigned elements, unsigned **unaligned_pointer, unsigned **aligned_pointer);
bool FLAC__memory_alloc_aligned_real_array(unsigned elements, real **unaligned_pointer, real **aligned_pointer);
#endif