@@ -95,11 +95,11 @@ } allocFailedException; uint32_t of_hash_seed; void * -of_alloc(size_t count, size_t size) +OFAllocMemory(size_t count, size_t size) { void *pointer; if OF_UNLIKELY (count == 0 || size == 0) return NULL; @@ -113,11 +113,11 @@ return pointer; } void * -of_alloc_zeroed(size_t count, size_t size) +OFAllocZeroedMemory(size_t count, size_t size) { void *pointer; if OF_UNLIKELY (count == 0 || size == 0) return NULL; @@ -132,11 +132,11 @@ return pointer; } void * -of_realloc(void *pointer, size_t count, size_t size) +OFResizeMemory(void *pointer, size_t count, size_t size) { if OF_UNLIKELY (count == 0 || size == 0) return NULL; if OF_UNLIKELY (count > SIZE_MAX / size) @@ -146,10 +146,16 @@ @throw [OFOutOfMemoryException exceptionWithRequestedSize: size]; return pointer; } + +void +OFFreeMemory(void *pointer) +{ + free(pointer); +} #if !defined(HAVE_ARC4RANDOM) && !defined(HAVE_GETRANDOM) static void initRandom(void) {