Skip to main content

Module platform

Module platform 

Source
Expand description

Platform-specific memory allocation interface.

This module provides an abstraction over the operating system’s virtual memory allocation APIs:

  • Linux: mmap via rustix with huge pages and guard pages support
  • macOS: mach_vm_allocate via mach2
  • Windows: VirtualAlloc via direct FFI
  • Other Unix: mmap via libc

Modules§

sys
Platform-specific memory allocation functions.

Structs§

AllocFailed
Error type for system memory allocation failures.
GuardedAlloc
Result of a guarded allocation.

Enums§

AllocErrorKind
Classification of allocation errors.
HugePageSize
Huge page size options (Linux only).