We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GlobalAlloc::alloc_zeroed
1 parent c337019 commit 8b7f4eeCopy full SHA for 8b7f4ee
std/src/sys/pal/hermit/alloc.rs
@@ -9,16 +9,6 @@ unsafe impl GlobalAlloc for System {
9
hermit_abi::malloc(layout.size(), layout.align())
10
}
11
12
- unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8 {
13
- let addr = hermit_abi::malloc(layout.size(), layout.align());
14
-
15
- if !addr.is_null() {
16
- ptr::write_bytes(addr, 0x00, layout.size());
17
- }
18
19
- addr
20
21
22
#[inline]
23
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
24
hermit_abi::free(ptr, layout.size(), layout.align())
0 commit comments