almalloc.h 363 B

123456789101112131415161718192021
  1. #ifndef AL_MALLOC_H
  2. #define AL_MALLOC_H
  3. #include <stddef.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /* Minimum alignment required by posix_memalign. */
  8. #define DEF_ALIGN sizeof(void*)
  9. void *al_malloc(size_t alignment, size_t size);
  10. void *al_calloc(size_t alignment, size_t size);
  11. void al_free(void *ptr);
  12. #ifdef __cplusplus
  13. }
  14. #endif
  15. #endif /* AL_MALLOC_H */