diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/mem.c | 8 | ||||
-rw-r--r-- | src/util/mutex.c | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/mem.c b/src/lib/mem.c index 2f50d3d..73c6a48 100644 --- a/src/lib/mem.c +++ b/src/lib/mem.c @@ -222,10 +222,10 @@ void free(void* memloc) unsigned char size = base[MEM_SIZE_OFFSET]; // TODO: Use Null PID base[MEM_USE_OFFSET] = 0; - // Clear out old memory - for(unsigned int i = 0; i < size; i++) { - base[i + MEM_BASE_SIZE] = 0; - } + // // Clear out old memory + // for(unsigned int i = 0; i < size; i++) { + // base[i + MEM_BASE_SIZE] = 0; + // } // If it is the last entry, clear it and move the heap top down if (base + size + MEM_META_SIZE == rpi_heap_top) { while(base[MEM_USE_OFFSET] == 0 && base >= rpi_heap) { diff --git a/src/util/mutex.c b/src/util/mutex.c index 0e1c816..52173af 100644 --- a/src/util/mutex.c +++ b/src/util/mutex.c @@ -47,5 +47,6 @@ struct Mutex* create_mutex(void* addr) // Ensure aligned to word - Important for Atomic Swap struct Mutex* m = (struct Mutex*)malloca(sizeof(struct Mutex), 4); m->addr = addr; + m->pid = 0; return m; } |