Memory Zones
First draft of memory zone functionality. Can create a zone and allocate you memory from the zone. Also has the ability to clear zones and to free. There is no way yet to free anything that has been allocated on the zones.
This commit is contained in:
23
quantum/src/defines.h
Normal file
23
quantum/src/defines.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
|
||||
typedef int16_t i16;
|
||||
typedef uint16_t u16;
|
||||
typedef int32_t i32;
|
||||
typedef uint32_t u32;
|
||||
typedef int64_t i64;
|
||||
typedef uint64_t u64;
|
||||
typedef float f32;
|
||||
typedef double f64;
|
||||
|
||||
static_assert(sizeof(i16) == 2);
|
||||
static_assert(sizeof(u16) == 2);
|
||||
static_assert(sizeof(i32) == 4);
|
||||
static_assert(sizeof(u32) == 4);
|
||||
static_assert(sizeof(i64) == 8);
|
||||
static_assert(sizeof(u64) == 8);
|
||||
static_assert(sizeof(f32) == 4);
|
||||
static_assert(sizeof(f64) == 8);
|
||||
|
||||
Reference in New Issue
Block a user