diff options
Diffstat (limited to 'lib/Headers/mm_malloc.h')
-rw-r--r-- | lib/Headers/mm_malloc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Headers/mm_malloc.h b/lib/Headers/mm_malloc.h index a680c47..fba8651 100644 --- a/lib/Headers/mm_malloc.h +++ b/lib/Headers/mm_malloc.h @@ -27,7 +27,8 @@ #include <errno.h> #include <stdlib.h> -static inline void *__attribute__((__always_inline__, __nodebug__)) _mm_malloc(size_t size, size_t align) +static __inline__ void *__attribute__((__always_inline__, __nodebug__)) +_mm_malloc(size_t size, size_t align) { if (align & (align - 1)) { errno = EINVAL; @@ -44,13 +45,15 @@ static inline void *__attribute__((__always_inline__, __nodebug__)) _mm_malloc(s if (!mallocedMemory) return 0; - void *alignedMemory = (void *)(((size_t)mallocedMemory + align) & ~((size_t)align - 1)); + void *alignedMemory = + (void *)(((size_t)mallocedMemory + align) & ~((size_t)align - 1)); ((void **)alignedMemory)[-1] = mallocedMemory; return alignedMemory; } -static inline void __attribute__((__always_inline__, __nodebug__)) _mm_free(void *p) +static __inline__ void __attribute__((__always_inline__, __nodebug__)) +_mm_free(void *p) { if (p) free(((void **)p)[-1]); |