We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 900d73d commit 2fcfa47Copy full SHA for 2fcfa47
memory.h
@@ -3,6 +3,8 @@
3
4
#include <stddef.h>
5
6
+void* reallocate(void* pointer, size_t oldSize, size_t newSize);
7
+
8
#define GROW_CAPACITY(capacity) \
9
((capacity) < 8 ? 8 : (capacity) * 2)
10
@@ -16,6 +18,7 @@
16
18
#define ALLOCATE(type, count) \
17
19
(type*)reallocate(NULL, 0, sizeof(type) * (count))
20
-#define FREE(type, pointer) reallocate(pointer, sizeof(type), 0)
21
+#define FREE(type, pointer) \
22
+ reallocate(pointer, sizeof(type), 0)
23
24
#endif
0 commit comments