mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-17 15:54:07 +10:00
Working on refactoring, read more
The main program segfaults, but right now I'm working on the tests, mainly.
This commit is contained in:
@@ -5,12 +5,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static int allocatedMemoryCount = 0;
|
||||
|
||||
void* reallocate(void* pointer, size_t oldSize, size_t newSize) {
|
||||
allocatedMemoryCount -= oldSize;
|
||||
allocatedMemoryCount += newSize;
|
||||
|
||||
if (newSize == 0) {
|
||||
free(pointer);
|
||||
|
||||
@@ -27,6 +22,3 @@ void* reallocate(void* pointer, size_t oldSize, size_t newSize) {
|
||||
return mem;
|
||||
}
|
||||
|
||||
int getAllocatedMemoryCount() {
|
||||
return allocatedMemoryCount;
|
||||
}
|
||||
Reference in New Issue
Block a user