Add a comment about waiting to kill the event thread
[openal-soft.git] / common / almalloc.h
bloba4297cf5036999bd02088ead215798b32f912be9
1 #ifndef AL_MALLOC_H
2 #define AL_MALLOC_H
4 #include <stddef.h>
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 /* Minimum alignment required by posix_memalign. */
11 #define DEF_ALIGN sizeof(void*)
13 void *al_malloc(size_t alignment, size_t size);
14 void *al_calloc(size_t alignment, size_t size);
15 void al_free(void *ptr);
17 size_t al_get_page_size(void);
19 /**
20 * Returns non-0 if the allocation function has direct alignment handling.
21 * Otherwise, the standard malloc is used with an over-allocation and pointer
22 * offset strategy.
24 int al_is_sane_alignment_allocator(void);
26 #ifdef __cplusplus
28 #endif
30 #endif /* AL_MALLOC_H */