Make A1.allocate() zero returned memory

This commit is contained in:
Josh Holtrop 2023-10-24 08:48:26 -04:00
parent 8303451929
commit 757f8f8c65

View File

@ -7,6 +7,7 @@ import hulk.hurl;
import hulk.hippo; import hulk.hippo;
import hulk.util; import hulk.util;
import hulk.pagetable; import hulk.pagetable;
import hulk.memory;
/** /**
* The A1 memory allocator is a one-shot memory allocator for kernel memory * The A1 memory allocator is a one-shot memory allocator for kernel memory
@ -48,6 +49,8 @@ struct A1
current_limit += PAGE_SIZE; current_limit += PAGE_SIZE;
} }
memset64(cast(void *)address, 0, size / 8);
return cast(void *)address; return cast(void *)address;
} }