refactor(allocator): use memset when creating allocator
This commit is contained in:
@@ -49,9 +49,7 @@ void *JLANG_CreateAllocator() {
|
||||
allocator->size = 1 * 1024;
|
||||
|
||||
// ensure all memory is zero
|
||||
for (int i = 0; i < 1 * 1024; i++) {
|
||||
allocator->memory[i] = 0;
|
||||
}
|
||||
memset(allocator->memory, 0, 1024);
|
||||
|
||||
return allocator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user