Prog
This commit is contained in:
@@ -8,17 +8,6 @@
|
||||
#include "memory.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
void * memoryAllocate(const size_t size) {
|
||||
void *ptr = malloc(size);
|
||||
assertNotNull(ptr, "Failed to allocate memory.");
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void memoryFree(void *ptr) {
|
||||
assertNotNull(ptr, "Cannot free NULL memory.");
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void memoryCopy(void *dest, const void *src, const size_t size) {
|
||||
assertNotNull(dest, "Cannot copy to NULL memory.");
|
||||
assertNotNull(src, "Cannot copy from NULL memory.");
|
||||
|
||||
Reference in New Issue
Block a user