Home | History | Annotate | Download | only in runtime

Lines Matching refs:Mmap

15 // Test that the error value returned by mmap is positive, as that is
19 p := runtime.Mmap(nil, ^uintptr(0)&^(runtime.GetPhysPageSize()-1), 0, runtime.MAP_ANON|runtime.MAP_PRIVATE, -1, 0)
21 // The runtime.mmap function is nosplit, but t.Errorf is not.
28 t.Errorf("mmap = %v, want %v", v, runtime.ENOMEM)
33 // Mmap fails if the address is not page aligned, so we can
38 b := uintptr(runtime.Mmap(nil, 2*ps, 0, runtime.MAP_ANON|runtime.MAP_PRIVATE, -1, 0))
40 t.Fatalf("Mmap: %v", b)
43 // Mmap should fail at a half page into the buffer.
44 err := uintptr(runtime.Mmap(unsafe.Pointer(uintptr(b)+ps/2), ps, 0, runtime.MAP_ANON|runtime.MAP_PRIVATE|runtime.MAP_FIXED, -1, 0))
46 t.Errorf("Mmap should have failed with half-page alignment %d, but succeeded: %v", ps/2, err)
49 // Mmap should succeed at a full page into the buffer.
50 err = uintptr(runtime.Mmap(unsafe.Pointer(uintptr(b)+ps), ps, 0, runtime.MAP_ANON|runtime.MAP_PRIVATE|runtime.MAP_FIXED, -1, 0))
52 t.Errorf("Mmap at full-page alignment %d failed: %v", ps, err)