[][src]Enum sunrise_libkern::MemoryType

pub enum MemoryType {
    Unmapped,
    Io,
    Normal,
    CodeStatic,
    CodeMutable,
    Heap,
    SharedMemory,
    Alias,
    ModuleCodeStatic,
    ModuleCodeMutable,
    Ipc,
    Stack,
    ThreadLocal,
    TransferMemoryIsolated,
    TransferMemory,
    ProcessMemory,
    Reserved,
    NonSecureIpc,
    NonDeviceIpc,
    KernelStack,
    CodeReadOnly,
    CodeWritable,
}

The type of this memory area.

May be used to figure out how the memory area was created.

Variants

Unmapped

Nothing is stored there. Accessing it will page fault. An allocation can use this region.

Io

Mapped by the kernel during process creation, for every IO region in the NPDM.

Normal

Mapped by the kernel during process creation, for every Normal region in the NPDM.

CodeStatic

Mapped by the kernel during process creation, at the address and of the size given by the user in the CreateProcessInfo.

CodeMutable

Transitioned from CodeStatic in svcSetProcessMemoryPermission.

Heap

Mapped using svcSetHeapSize.

SharedMemory

Mapped using svcMapSharedMemory.

Alias

Mapped by using svcMapMemory to remap memory into the Alias region.

1.0.0 only!

ModuleCodeStatic

Mapped using svcMapProcessCodeMemory.

ModuleCodeMutable

Transitioned from ModuleCodeStatic in svcSetProcessMemoryPermission.

Ipc

IPC buffers with descriptor flags=0.

Stack

Mapped by using svcMapMemory to remap memory into the Stack region.

ThreadLocal

Mapped by the kernel during process creation. The TLS region is allocated there.

TransferMemoryIsolated

Mapped using svcMapTransferMemory when the owning process has perm = 0.

TransferMemory

Mapped using svcMapTransferMemory when the owning process has perm != 0.

ProcessMemory

Mapped using svcMapProcessMemory.

Reserved

Reserved for kernel use.

NonSecureIpc

IPC buffers with descriptor flags=1.

NonDeviceIpc

IPC buffers with descriptor flags=3.

KernelStack

Mapped by the kernel during svcCreateThread. Unused.

CodeReadOnly

Mapped with svcControlCodeMemory.

CodeWritable

Mapped with svcControlCodeMemory.

Implementations

impl MemoryType[src]

pub fn get_memory_state(self) -> MemoryState[src]

Get the MemoryState associated with a MemoryType.

Trait Implementations

impl Clone for MemoryType[src]

impl Copy for MemoryType[src]

impl Debug for MemoryType[src]

impl Eq for MemoryType[src]

impl PartialEq<MemoryType> for MemoryType[src]

impl StructuralEq for MemoryType[src]

impl StructuralPartialEq for MemoryType[src]

Auto Trait Implementations

impl Send for MemoryType

impl Sync for MemoryType

impl Unpin for MemoryType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.