Browse Source

Turns out alignof already existed

Thomas Johnson 5 months ago
parent
commit
70dbe3c3de
2 changed files with 1 additions and 2 deletions
  1. 0
    2
      allocator_internal.h
  2. 1
    0
      tree_alloc.c

+ 0
- 2
allocator_internal.h View File

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

+ 1
- 0
tree_alloc.c View File

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

Loading…
Cancel
Save