aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/un_memory.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/un_memory.c b/src/un_memory.c
index 84f5f14..b092196 100644
--- a/src/un_memory.c
+++ b/src/un_memory.c
@@ -103,25 +103,25 @@ Allocator un_allocator_get_standard(void) {
static struct {
u64 index;
u8 data[UN_TEMP_SIZE];
-} temp;
+} _temp;
static void temp_reset(void) {
- temp.index = 0;
+ _temp.index = 0;
}
static void *temp_alloc(u64 size) {
- if ((temp.index + size) > UN_TEMP_SIZE) {
+ if ((_temp.index + size) > UN_TEMP_SIZE) {
// @todo: Decice what is the best behaviour for wrapping
assert(false);
temp_reset();
}
- if ((temp.index + size) > UN_TEMP_SIZE) {
+ if ((_temp.index + size) > UN_TEMP_SIZE) {
return NULL;
}
- void *ptr = (u8*)temp.data + temp.index;
- temp.index += size;
+ void *ptr = (u8*)_temp.data + _temp.index;
+ _temp.index += size;
un_memory_set(ptr, 0x00, size);
return ptr;