Fix attribute
This commit is contained in:
+2
-1
@@ -152,7 +152,8 @@ static inline void *larena_alloc(LArena *arena, size_t sz)
|
|||||||
|
|
||||||
// Allocate @sz bytes from the LArena, returned pointer is aligned to @align
|
// Allocate @sz bytes from the LArena, returned pointer is aligned to @align
|
||||||
// Returns NULL if not enough space
|
// Returns NULL if not enough space
|
||||||
static inline void *larena_alloc_aligned(LArena *arena, size_t sz, unsigned int align) [[gnu::alloc_align(3)]]
|
[[gnu::alloc_align(3)]]
|
||||||
|
static inline void *larena_alloc_aligned(LArena *arena, size_t sz, unsigned int align)
|
||||||
{
|
{
|
||||||
assert(align != 0);
|
assert(align != 0);
|
||||||
assert((align & (align - 1)) == 0); // power of 2
|
assert((align & (align - 1)) == 0); // power of 2
|
||||||
|
|||||||
Reference in New Issue
Block a user