diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/inc/def.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/inc/def.h b/src/lib/inc/def.h index 69b43e3..6e3066a 100644 --- a/src/lib/inc/def.h +++ b/src/lib/inc/def.h @@ -3,6 +3,10 @@ #ifndef DEF_H #define DEF_H +/** + * Types + */ + typedef signed char s8; typedef unsigned char u8; @@ -15,6 +19,19 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; +/** + * Macros + */ + #define NULL ((void *)0) +#define malloc(n) ((void *)((HEAP += n) - n)) // TODO: Implement real/better malloc/free +#define free(x) + +/** + * Heap + */ + +extern u32 HEAP; +extern u32 HEAP_START; #endif |