1
0
mirror of https://github.com/taigrr/gopher-os synced 2025-01-18 04:43:13 -08:00
gopher-os/src/gopheros/kernel/mem/constants_amd64.go
Achilleas Anagnostopoulos 8dfc5d4e92 Use pwd as a workspace; move sources to src/gopheros and rewrite imports
By setting up pwd as a Go workspace, we can trim import paths from
something like "github.com/achilleasa/gopher-os/kernel" to just
"kernel".

These changes make forking easier and also allows us to move the code to
a different git hosting provider without having to rewrite the imports.
2017-07-01 20:37:09 +01:00

18 lines
475 B
Go

// +build amd64
package mem
const (
// PointerShift is equal to log2(unsafe.Sizeof(uintptr)). The pointer
// size for this architecture is defined as (1 << PointerShift).
PointerShift = 3
// PageShift is equal to log2(PageSize). This constant is used when
// we need to convert a physical address to a page number (shift right by PageShift)
// and vice-versa.
PageShift = 12
// PageSize defines the system's page size in bytes.
PageSize = Size(1 << PageShift)
)