ZXFoundation™ 26h2
Loading...
Searching...
No Matches
types.cxxm File Reference

SLUB slab allocator type definitions. More...

import arch.s390x.cpu.types;
import std;
import zxfoundation.memory.numa.types;
import zxfoundation.scoms.kobject.base;
import zxfoundation.sync.qspinlock.core;
import zxfoundation.sync.rcu.types;
import zxfoundation.base.config;
import zxfoundation.base.typestate;
import zxfoundation.memory.objects;
import zxfoundation.base.types;
Include dependency graph for types.cxxm:

Data Structures

class  zxfoundation::memory::slub::kmem_cache
 SLUB slab cache descriptor. More...
struct  zxfoundation::memory::slub::kmem_cache_cpu
 Per-CPU hot allocation state. More...
struct  zxfoundation::memory::slub::kmem_cache_node
 Per-NUMA-node slab state. More...
class  zxfoundation::memory::slub::kmem_cache_ref< State >
 Type-safe, zero-overhead reference to a kmem_cache in a known lifecycle state. More...
struct  zxfoundation::memory::slub::slab_header
 Metadata embedded at the physical start of each slab frame. More...

Typedefs

using zxfoundation::memory::slub::kmem_cache_ref_active = kmem_cache_ref<lifecycle_state::active>
using zxfoundation::memory::slub::kmem_cache_ref_embryo = kmem_cache_ref<lifecycle_state::embryo>

Enumerations

enum class  zxfoundation::memory::slub::lifecycle_state
 Unified lifecycle states for ALL typestate-tracked resources. More...
enum class  zxfoundation::memory::slub::slub_flags : u32 {
  none = 0 , typesafe_by_rcu = 1U << 0 , hwcache_align = 1U << 1 , poison = 1U << 2 ,
  red_zone = 1U << 3 , no_reap = 1U << 4
}
 Cache creation flags. More...

Functions

constexpr auto zxfoundation::memory::slub::operator! (slub_flags a) noexcept -> bool
constexpr auto zxfoundation::memory::slub::operator& (slub_flags a, slub_flags b) noexcept -> slub_flags
constexpr auto zxfoundation::memory::slub::operator| (slub_flags a, slub_flags b) noexcept -> slub_flags

Variables

constexpr usize zxfoundation::memory::slub::CACHE_LINE_SIZE
 IBM z-series L1/L2 cache line size in bytes.
constexpr u32 zxfoundation::memory::slub::SLUB_CPU_PARTIAL_DEFAULT = 13U
 Max objects on a CPU's partial list before spilling to node.
constexpr u32 zxfoundation::memory::slub::SLUB_MAX_CACHES = 64U
 Maximum number of distinct kmem_caches (static table).
constexpr u32 zxfoundation::memory::slub::SLUB_MAX_ORDER = 5U
 Maximum PMM order SLUB will use for slab pages.
constexpr u32 zxfoundation::memory::slub::SLUB_MAX_PARTIAL = 20U
constexpr u32 zxfoundation::memory::slub::SLUB_MAX_SIZE = 32768U
 Maximum SLUB allocation size (larger goes directly to PMM).
constexpr u32 zxfoundation::memory::slub::SLUB_MIN_PARTIAL = 5U
 Maximum partial slabs kept on the node partial list per cache.

Detailed Description

SLUB slab allocator type definitions.

SPDX-License-Identifier: Apache-2.0

Enumeration Type Documentation

◆ lifecycle_state

enum class zxfoundation::base::lifecycle_state : u8
strong

Unified lifecycle states for ALL typestate-tracked resources.

Every SCOMS-managed object, every folio, and every slab cache uses exactly these states. No subsystem may define its own.

◆ slub_flags

enum class zxfoundation::memory::slub::slub_flags : u32
exportstrong

Cache creation flags.

Enumerator
typesafe_by_rcu 

Defer slab-page freeing until an RCU grace period elapses.

hwcache_align 

Align objects to hardware cache-line boundaries.

poison 

Poison free objects with a known pattern (debug).

red_zone 

Add red zones around objects (debug).

no_reap 

Do not automatically shrink the cache under memory pressure.