File tree Expand file tree Collapse file tree 5 files changed +13
-1
lines changed
Expand file tree Collapse file tree 5 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1010#include <time.h>
1111
1212#define BUDDY_ALLOC_ALIGN 64
13+ #ifndef BUDDY_ALLOC_IMPLEMENTATION
1314#define BUDDY_ALLOC_IMPLEMENTATION
15+ #endif
1416#include "buddy_alloc.h"
1517#undef BUDDY_ALLOC_IMPLEMENTATION
1618
Original file line number Diff line number Diff line change 1+ -DBUDDY_ALLOC_IMPLEMENTATION
2+ -DBUDDY_EXPERIMENTAL_CHANGE_TRACKING
Original file line number Diff line number Diff line change 11#include <assert.h>
22#include <stdlib.h>
3+
4+ #ifndef BUDDY_ALLOC_IMPLEMENTATION
35#define BUDDY_ALLOC_IMPLEMENTATION
6+ #endif
47#include "buddy_alloc.h"
58
69int main (void )
Original file line number Diff line number Diff line change 33 */
44
55// Just include buddy_alloc from C++
6+ #ifndef BUDDY_ALLOC_IMPLEMENTATION
67#define BUDDY_ALLOC_IMPLEMENTATION
8+ #endif
79#include " buddy_alloc.h"
810#undef BUDDY_ALLOC_IMPLEMENTATION
911
Original file line number Diff line number Diff line change 77#define _POSIX_C_SOURCE 200112L
88
99#include <assert.h>
10- #include <errno.h>
1110#include <stdio.h>
1211#include <stdlib.h>
1312#include <string.h>
1413
14+ #ifndef BUDDY_EXPERIMENTAL_CHANGE_TRACKING
1515#define BUDDY_EXPERIMENTAL_CHANGE_TRACKING
16+ #endif
1617
18+ #ifndef BUDDY_ALLOC_IMPLEMENTATION
1719#define BUDDY_ALLOC_IMPLEMENTATION
20+ #endif
1821#include "buddy_alloc.h"
1922#undef BUDDY_ALLOC_IMPLEMENTATION
2023
You can’t perform that action at this time.
0 commit comments