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