mirror of
https://github.com/taigrr/gopher-os
synced 2026-03-26 05:02:25 -07:00
Remove mem.PageOrder
Since the goal is to bootstrap the runtime's slab-like allocator the kernel should only deal with managing allocations at a single page level.
This commit is contained in:
@@ -32,7 +32,7 @@ func TestMapTemporaryAmd64(t *testing.T) {
|
||||
nextPhysPage := 0
|
||||
|
||||
// allocFn returns pages from index 1; we keep index 0 for the P4 entry
|
||||
allocFn := func(_ mem.PageOrder) (pmm.Frame, *kernel.Error) {
|
||||
allocFn := func() (pmm.Frame, *kernel.Error) {
|
||||
nextPhysPage++
|
||||
pageAddr := unsafe.Pointer(&physPages[nextPhysPage][0])
|
||||
return pmm.Frame(uintptr(pageAddr) >> mem.PageShift), nil
|
||||
@@ -134,7 +134,7 @@ func TestMapTemporaryErrorsAmd64(t *testing.T) {
|
||||
|
||||
expErr := &kernel.Error{Module: "test", Message: "out of memory"}
|
||||
|
||||
allocFn := func(_ mem.PageOrder) (pmm.Frame, *kernel.Error) {
|
||||
allocFn := func() (pmm.Frame, *kernel.Error) {
|
||||
return 0, expErr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user