MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / malloc_large_allocation_succeeds

Function malloc_large_allocation_succeeds

crates/os-runtime/tests/boot.rs:785–803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

783#[test]
784fn free_null_is_a_noop() {
785 let src = [
786 MALLOC_PRELUDE,
787 r#"
788kmain: () {
789 free(null)
790 system.shutdown(0)
791}
792"#,
793 ]
794 .concat();
795 let (_, exit) = run_kernel_hll(&src);
796 assert_eq!(
797 exit,
798 Some(0),
799 "free(null) must be a silent no-op and not crash"
800 );
801}
802
803#[test]
804fn malloc_large_allocation_succeeds() {
805 let src = [
806 MALLOC_PRELUDE,

Callers

nothing calls this directly

Calls 1

run_kernel_hllFunction · 0.70

Tested by

no test coverage detected