1
0
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:
Achilleas Anagnostopoulos
2017-06-17 07:11:08 +01:00
parent 1d11af21c2
commit c0a9e07e83
7 changed files with 20 additions and 44 deletions

View File

@@ -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
}