Browse Source

Turns out alignof already existed

tree_alloc
Thomas Johnson 1 year ago
parent
commit
70dbe3c3de
  1. 2
      allocator_internal.h
  2. 1
      tree_alloc.c

2
allocator_internal.h

@ -3,8 +3,6 @@
#include <stdint.h>
#define alignof(x) offsetof(struct { char pad; x member; }, member)
// No enum because these need to be 1 byte
const char RT_FREESPACE = 0;
const char RT_TREE_NODE = 1;

1
tree_alloc.c

@ -1,5 +1,6 @@
#include <stddef.h>
#include <stdalign.h>
#include "allocator_internal.h"

Loading…
Cancel
Save