MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / clear_bss

Function clear_bss

os/src/main.rs:35–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33core::arch::global_asm!(include_str!("entry.asm"));
34
35fn clear_bss() {
36 extern "C" {
37 fn sbss();
38 fn ebss();
39 }
40 unsafe {
41 core::slice::from_raw_parts_mut(sbss as usize as *mut u8, ebss as usize - sbss as usize)
42 .fill(0);
43 }
44}
45
46use lazy_static::*;
47use sync::UPIntrFreeCell;

Callers 1

rust_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected