Stdlib module memory.vitl

This page is a wiki-style reference for one concrete stdlib file. It explains what the file owns, where it fits in the family, and how to decide whether this is the right surface to depend on.

Visual portrait of memory.vitl
Wiki-style portrait for memory.vitl.

Family: stdlib

Kind: public stdlib surface

Page style: this reference follows the same “encyclopedic card + portrait + usage contract” logic as the keyword pages, but for stdlib modules.

Summary

Overview

FieldValue
Pathmemory.vitl
Familystdlib
Kindpublic stdlib surface
Line count655
Declared procedures137
Declared forms/picks16

`memory.vitl` is a public stdlib surface inside the `stdlib` family. It should be read as one focused slice of the broader family responsibility: Top-level map of the Vitte standard library and the responsibilities owned by each family.

Purpose

This file should be chosen because of responsibility, not because its name “sounds close enough”. Inside the stdlib family, it carries one focused part of the contract and keeps that responsibility separate from neighboring concerns.

  • Domain values start in `core` and `strings`.
  • Grouped data moves through `collections` or `data`.
  • Structured export goes through `json` and `encoding`.
  • Filesystem or process interaction goes through `path`, `io`, `os`, or `sysinfo`.
  • Explicit runtime coordination goes through `async`, `threading`, `kernel`, or `ffi`.

Taxonomy

Think of this page as a generated encyclopedia entry rather than a hand-written tutorial. The goal is to show what kind of module this is, how dense it is, and what reading strategy makes sense before depending on it.

  • Large algorithm surface: this file exposes many procedures and likely acts as a domain toolkit rather than a single thin wrapper.
  • Owns domain vocabulary: the module declares data shapes in addition to executable helpers, so its types are part of the contract.
  • Has tuning constants: part of the module behavior is controlled by named constants that document default precision, limits, or policy.
  • Minimal top-level dependencies: the module reads as mostly self-contained from its opening declarations.

Implementation profile

This profile is inferred directly from the source text. It does not replace reading the file, but it tells you quickly whether the module is mostly declarative, loop-heavy, branch-heavy, or organized around many small exits.

SignalCountWhat it suggests
if0Branching density and local decision-making.
while0Loop-heavy or iterative implementation style.
for0Collection-style traversal at source level.
match0Variant-driven branching or grammar-style decoding.
let0Local state and intermediate value density.
give137Number of explicit exit points and result shaping.

Top-level API inventory

SurfaceItems
Proceduresmemory_ok, memory_error, is_null, non_null, align_up, align_down, is_aligned, align_ptr, page_align_up, page_align_down, page_index, page_addr
FormsMemoryResult, MemoryBlock, MemoryRegion, Page, PageRange, Heap, Arena, Pool, SlabClass, SlabAllocator, ByteBuffer, MemoryStats
PicksMemoryStatus, AllocKind, PageState
ConstantsMEMORY_VERSION, OK, ERR, NULL, PAGE_SIZE, HUGE_PAGE_SIZE, DEFAULT_ALIGN, CACHE_LINE_SIZE, KB, MB, GB, MEM_READ
Exportsnone declared at top level

Imported surfaces

This file does not advertise a top-level `use` surface in its opening declarations. That often means it is either self-contained or an aggregation layer.

Position in family

This file is module 5 of 15 in the stdlib family when ordered by path. By procedure count it ranks 3, and by line count it ranks 3. Those ranks are useful as rough signals of breadth, not as quality judgments.

Declaration map

The declaration map turns raw source into a scan-friendly catalog. It is useful when the file is large enough that a reader wants to orient by kinds of surfaces first.

LineNameKindRole
1vitte/stdlib_checked/memoryspaceDeclares the namespace that anchors this file in the stdlib tree.
9MEMORY_VERSIONconstDefines a named constant reused across the module.
11OKconstDefines a named constant reused across the module.
13ERRconstDefines a named constant reused across the module.
15NULLconstDefines a named constant reused across the module.
17PAGE_SIZEconstDefines a named constant reused across the module.
19HUGE_PAGE_SIZEconstDefines a named constant reused across the module.
21DEFAULT_ALIGNconstDefines a named constant reused across the module.
23CACHE_LINE_SIZEconstDefines a named constant reused across the module.
25KBconstDefines a named constant reused across the module.
27MBconstDefines a named constant reused across the module.
29GBconstDefines a named constant reused across the module.
31MEM_READconstDefines a named constant reused across the module.
33MEM_WRITEconstDefines a named constant reused across the module.
35MEM_EXECconstDefines a named constant reused across the module.
37MEM_USERconstDefines a named constant reused across the module.
39MEM_KERNELconstDefines a named constant reused across the module.
41MEM_DEVICEconstDefines a named constant reused across the module.
43MEM_DMAconstDefines a named constant reused across the module.
45MemoryStatuspickIntroduces a tagged variant type used to model distinct outcomes.
49AllocKindpickIntroduces a tagged variant type used to model distinct outcomes.
53PageStatepickIntroduces a tagged variant type used to model distinct outcomes.
57MemoryResultformIntroduces a structured data shape that other procedures can exchange.
61MemoryBlockformIntroduces a structured data shape that other procedures can exchange.
65MemoryRegionformIntroduces a structured data shape that other procedures can exchange.
69PageformIntroduces a structured data shape that other procedures can exchange.
73PageRangeformIntroduces a structured data shape that other procedures can exchange.
77HeapformIntroduces a structured data shape that other procedures can exchange.
81ArenaformIntroduces a structured data shape that other procedures can exchange.
85PoolformIntroduces a structured data shape that other procedures can exchange.
89SlabClassformIntroduces a structured data shape that other procedures can exchange.
93SlabAllocatorformIntroduces a structured data shape that other procedures can exchange.
97ByteBufferformIntroduces a structured data shape that other procedures can exchange.
101MemoryStatsformIntroduces a structured data shape that other procedures can exchange.
105MemoryMapformIntroduces a structured data shape that other procedures can exchange.
109memory_okprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
113memory_errorprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
117is_nullprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
121non_nullprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
125align_upprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
129align_downprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
133is_alignedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
137align_ptrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
141page_align_upprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
145page_align_downprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
149page_indexprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
153page_addrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
157page_offsetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
161pages_for_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
165bytes_to_kbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
169bytes_to_mbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
173bytes_to_gbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
177kbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
181mbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
185gbprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
189checked_addprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
193checked_mulprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
197ptr_addprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
201ptr_subprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
205ptr_diffprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
209ptr_in_rangeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
213ranges_overlapprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
217block_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
221block_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
225block_endprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
229block_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
233block_is_validprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
237region_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
241region_endprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
245region_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
249region_is_readableprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
253region_is_writableprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
257region_is_executableprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
261region_is_kernelprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
265region_is_userprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
269memory_map_emptyprocOwns a concrete data shape or the operations that maintain it.
273memory_map_addprocOwns a concrete data shape or the operations that maintain it.
277memory_map_findprocOwns a concrete data shape or the operations that maintain it.
281memory_map_usable_regionsprocOwns a concrete data shape or the operations that maintain it.
285heap_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
289heap_remainingprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
293heap_allocprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
297heap_last_blockprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
301heap_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
305heap_resetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
309heap_statsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
313arena_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
317arena_remainingprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
321arena_currentprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
325arena_allocprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
329arena_alloc_alignedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
333arena_last_addrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
337arena_resetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
341arena_markprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
345arena_restoreprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
349arena_usedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
353arena_fullprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
357pool_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
361pool_block_addrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
365pool_index_ofprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
369pool_has_freeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
373pool_allocprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
377pool_last_alloc_addrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
381pool_freeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
385pool_usedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
389pool_free_countprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
393pool_capacityprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
397pool_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
401slab_classprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
405slab_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
409slab_find_classprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
413slab_allocprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
417slab_freeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
421slab_free_blocksprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
425page_newprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
429page_is_freeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
433page_is_usedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
437page_rangeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
441page_range_endprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
445page_range_containsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
449pages_makeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
453pages_mark_rangeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
457pages_find_free_runprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
461pages_allocprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
465pages_freeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
469bytes_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
473bytes_lenprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
477bytes_is_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
481bytes_repeatprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
485bytes_zeroprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
489bytes_fillprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
493bytes_sliceprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
497bytes_concatprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
501bytes_getprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
505bytes_setprocOwns a concrete data shape or the operations that maintain it.
509bytes_equalprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
513memcmpprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
517memcpyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
521memmoveprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
525memsetprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
529memzeroprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
533memchrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
537memrchrprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
541buffer_newprocOwns byte movement or host I/O interaction.
545buffer_from_bytesprocOwns byte movement or host I/O interaction.
549buffer_is_emptyprocOwns byte movement or host I/O interaction.
553buffer_remainingprocOwns byte movement or host I/O interaction.
557buffer_clearprocOwns byte movement or host I/O interaction.
561buffer_reserveprocOwns byte movement or host I/O interaction.
565buffer_push_byteprocOwns byte movement or host I/O interaction.
569buffer_appendprocOwns byte movement or host I/O interaction.
573buffer_sliceprocOwns byte movement or host I/O interaction.
577buffer_to_bytesprocOwns byte movement or host I/O interaction.
581array_fill_intprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
585memory_stats_emptyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
589memory_stats_from_heapprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
593memory_stats_percent_usedprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
597memory_format_sizeprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
601memory_check_blockprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
605memory_check_regionprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
609memory_zero_blockprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
613memory_copy_blockprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
617memory_domainsprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
621memory_readyprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
625library_metaprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
629memory_selftest_alignmentprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
633memory_selftest_bytesprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
637memory_selftest_heapprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
641memory_selftest_arenaprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
645memory_selftest_poolprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
649memory_selftest_pagesprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.
653memory_selftestprocRepresents one top-level surface in the file contract and should be read as part of the module boundary.

The table is exhaustive for top-level declarations of the selected kinds. This file declares 172 matching surfaces.

Representative signatures

These signatures are shown in source order so the page keeps the feel of a reference manual, not just a keyword cloud.

  • const MEMORY_VERSION: string = "" (line 9)
  • const OK: int = 0 (line 11)
  • const ERR: int = 0 (line 13)
  • const NULL: usize = 0 (line 15)
  • const PAGE_SIZE: usize = 0 (line 17)
  • const HUGE_PAGE_SIZE: usize = 0 (line 19)
  • const DEFAULT_ALIGN: usize = 0 (line 21)
  • const CACHE_LINE_SIZE: usize = 0 (line 23)
  • const KB: usize = 0 (line 25)
  • const MB: usize = 0 (line 27)
  • const GB: usize = 0 (line 29)
  • const MEM_READ: int = 0 (line 31)
  • const MEM_WRITE: int = 0 (line 33)
  • const MEM_EXEC: int = 0 (line 35)
  • const MEM_USER: int = 0 (line 37)
  • const MEM_KERNEL: int = 0 (line 39)
  • const MEM_DEVICE: int = 0 (line 41)
  • const MEM_DMA: int = 0 (line 43)

The list is intentionally capped here; the source file declares 171 matching signatures in total.

How to use this module

Start by reading the file as an ownership boundary. Ask three questions: what enters this module, what stable types or procedures it exports, and what adjacent module should stay outside of it.

  1. Read space and top-level imports first so the ownership boundary of memory.vitl is explicit.
  2. Scan constants before procedures; they often encode precision, limits, or policy assumptions that explain later behavior.
  3. Read declared forms and picks before algorithms so the data vocabulary is stable in your head.
  4. Traverse procedures in source order; the early helpers usually explain the naming and numeric conventions used later.
  5. Only after that compare neighbor modules, because the right boundary choice matters more than memorizing one helper name.

User example

This example is generated from the actual stdlib module surface. Its job is not to be the smallest snippet possible; its job is to show a realistic consumer-shaped file that exercises the module and mirrors the language keywords the module itself relies on.

space demo/memory
form DemoState {
  ready: bool,
  note: string
}
proc run_example() -> DemoState {
  let ready: bool = memory_ok()
  give DemoState { ready: ready, note: "ok" }
}

Keyword coverage

This table makes the “all keywords of the module” requirement auditable. It compares the detected Vitte keywords in the source file with the generated consumer example above.

KeywordPresent in module sourceUsed in generated user example
spaceyesyes
constyesno
formyesyes
pickyesno
procyesyes
giveyesyes

Keywords still not exercised directly in the generated snippet: const, pick. The page still lists them here so the gap is visible.

Source shape

space vitte/stdlib_checked/memory
const MEMORY_VERSION: string = ""
const OK: int = 0
const ERR: int = 0
const NULL: usize = 0
const PAGE_SIZE: usize = 0
const HUGE_PAGE_SIZE: usize = 0
const DEFAULT_ALIGN: usize = 0
const CACHE_LINE_SIZE: usize = 0
const KB: usize = 0

The excerpt is not meant to replace the file. It exists to make the module recognizable at first glance, the same way a Wikipedia infobox helps the reader orient before reading the whole article.

Source landmarks

Large files are easier to retain when they have visible landmarks. When the source contains explicit section banners, they are surfaced here; otherwise the first major declarations are used as anchors.

  • Line 1: space vitte/stdlib_checked/memory
  • Line 9: const MEMORY_VERSION: string = ""
  • Line 11: const OK: int = 0
  • Line 13: const ERR: int = 0
  • Line 15: const NULL: usize = 0
  • Line 17: const PAGE_SIZE: usize = 0
  • Line 19: const HUGE_PAGE_SIZE: usize = 0
  • Line 21: const DEFAULT_ALIGN: usize = 0

Source organization

When a file carries its own internal chaptering, those chapters usually reveal the intended reading order better than a flat symbol list. This section reconstructs that organization from the source itself.

File surfaces

Top-level items: 172. Procedures: 137. Data surfaces: 16. Constants: 18.

First visible names: vitte/stdlib_checked/memory, MEMORY_VERSION, OK, ERR, NULL, PAGE_SIZE, HUGE_PAGE_SIZE, DEFAULT_ALIGN, CACHE_LINE_SIZE, KB

Complete API catalog

This catalog is the exhaustive file-level index for the module. It is intentionally closer to a generated encyclopedia appendix than to a tutorial summary.

Constants

LineNameSignatureRole
9MEMORY_VERSIONconst MEMORY_VERSION: string = ""Defines a named constant reused across the module.
11OKconst OK: int = 0Defines a named constant reused across the module.
13ERRconst ERR: int = 0Defines a named constant reused across the module.
15NULLconst NULL: usize = 0Defines a named constant reused across the module.
17PAGE_SIZEconst PAGE_SIZE: usize = 0Defines a named constant reused across the module.
19HUGE_PAGE_SIZEconst HUGE_PAGE_SIZE: usize = 0Defines a named constant reused across the module.
21DEFAULT_ALIGNconst DEFAULT_ALIGN: usize = 0Defines a named constant reused across the module.
23CACHE_LINE_SIZEconst CACHE_LINE_SIZE: usize = 0Defines a named constant reused across the module.
25KBconst KB: usize = 0Defines a named constant reused across the module.
27MBconst MB: usize = 0Defines a named constant reused across the module.
29GBconst GB: usize = 0Defines a named constant reused across the module.
31MEM_READconst MEM_READ: int = 0Defines a named constant reused across the module.
33MEM_WRITEconst MEM_WRITE: int = 0Defines a named constant reused across the module.
35MEM_EXECconst MEM_EXEC: int = 0Defines a named constant reused across the module.
37MEM_USERconst MEM_USER: int = 0Defines a named constant reused across the module.
39MEM_KERNELconst MEM_KERNEL: int = 0Defines a named constant reused across the module.
41MEM_DEVICEconst MEM_DEVICE: int = 0Defines a named constant reused across the module.
43MEM_DMAconst MEM_DMA: int = 0Defines a named constant reused across the module.

Data surfaces

LineNameSignatureRole
45MemoryStatuspick MemoryStatus {Introduces a tagged variant type used to model distinct outcomes.
49AllocKindpick AllocKind {Introduces a tagged variant type used to model distinct outcomes.
53PageStatepick PageState {Introduces a tagged variant type used to model distinct outcomes.
57MemoryResultform MemoryResult {Introduces a structured data shape that other procedures can exchange.
61MemoryBlockform MemoryBlock {Introduces a structured data shape that other procedures can exchange.
65MemoryRegionform MemoryRegion {Introduces a structured data shape that other procedures can exchange.
69Pageform Page {Introduces a structured data shape that other procedures can exchange.
73PageRangeform PageRange {Introduces a structured data shape that other procedures can exchange.
77Heapform Heap {Introduces a structured data shape that other procedures can exchange.
81Arenaform Arena {Introduces a structured data shape that other procedures can exchange.
85Poolform Pool {Introduces a structured data shape that other procedures can exchange.
89SlabClassform SlabClass {Introduces a structured data shape that other procedures can exchange.
93SlabAllocatorform SlabAllocator {Introduces a structured data shape that other procedures can exchange.
97ByteBufferform ByteBuffer {Introduces a structured data shape that other procedures can exchange.
101MemoryStatsform MemoryStats {Introduces a structured data shape that other procedures can exchange.
105MemoryMapform MemoryMap {Introduces a structured data shape that other procedures can exchange.

Procedures

LineNameSignatureRole
109memory_okproc memory_ok() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
113memory_errorproc memory_error() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
117is_nullproc is_null() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
121non_nullproc non_null() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
125align_upproc align_up() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
129align_downproc align_down() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
133is_alignedproc is_aligned() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
137align_ptrproc align_ptr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
141page_align_upproc page_align_up() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
145page_align_downproc page_align_down() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
149page_indexproc page_index() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
153page_addrproc page_addr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
157page_offsetproc page_offset() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
161pages_for_sizeproc pages_for_size() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
165bytes_to_kbproc bytes_to_kb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
169bytes_to_mbproc bytes_to_mb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
173bytes_to_gbproc bytes_to_gb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
177kbproc kb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
181mbproc mb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
185gbproc gb() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
189checked_addproc checked_add() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
193checked_mulproc checked_mul() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
197ptr_addproc ptr_add() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
201ptr_subproc ptr_sub() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
205ptr_diffproc ptr_diff() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
209ptr_in_rangeproc ptr_in_range() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
213ranges_overlapproc ranges_overlap() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
217block_newproc block_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
221block_emptyproc block_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
225block_endproc block_end() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
229block_containsproc block_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
233block_is_validproc block_is_valid() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
237region_newproc region_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
241region_endproc region_end() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
245region_containsproc region_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
249region_is_readableproc region_is_readable() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
253region_is_writableproc region_is_writable() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
257region_is_executableproc region_is_executable() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
261region_is_kernelproc region_is_kernel() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
265region_is_userproc region_is_user() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
269memory_map_emptyproc memory_map_empty() -> int {Owns a concrete data shape or the operations that maintain it.
273memory_map_addproc memory_map_add() -> int {Owns a concrete data shape or the operations that maintain it.
277memory_map_findproc memory_map_find() -> int {Owns a concrete data shape or the operations that maintain it.
281memory_map_usable_regionsproc memory_map_usable_regions() -> int {Owns a concrete data shape or the operations that maintain it.
285heap_newproc heap_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
289heap_remainingproc heap_remaining() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
293heap_allocproc heap_alloc() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
297heap_last_blockproc heap_last_block() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
301heap_containsproc heap_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
305heap_resetproc heap_reset() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
309heap_statsproc heap_stats() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
313arena_newproc arena_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
317arena_remainingproc arena_remaining() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
321arena_currentproc arena_current() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
325arena_allocproc arena_alloc() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
329arena_alloc_alignedproc arena_alloc_aligned() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
333arena_last_addrproc arena_last_addr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
337arena_resetproc arena_reset() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
341arena_markproc arena_mark() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
345arena_restoreproc arena_restore() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
349arena_usedproc arena_used() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
353arena_fullproc arena_full() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
357pool_newproc pool_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
361pool_block_addrproc pool_block_addr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
365pool_index_ofproc pool_index_of() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
369pool_has_freeproc pool_has_free() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
373pool_allocproc pool_alloc() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
377pool_last_alloc_addrproc pool_last_alloc_addr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
381pool_freeproc pool_free() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
385pool_usedproc pool_used() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
389pool_free_countproc pool_free_count() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
393pool_capacityproc pool_capacity() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
397pool_containsproc pool_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
401slab_classproc slab_class() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
405slab_newproc slab_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
409slab_find_classproc slab_find_class() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
413slab_allocproc slab_alloc() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
417slab_freeproc slab_free() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
421slab_free_blocksproc slab_free_blocks() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
425page_newproc page_new() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
429page_is_freeproc page_is_free() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
433page_is_usedproc page_is_used() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
437page_rangeproc page_range() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
441page_range_endproc page_range_end() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
445page_range_containsproc page_range_contains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
449pages_makeproc pages_make() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
453pages_mark_rangeproc pages_mark_range() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
457pages_find_free_runproc pages_find_free_run() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
461pages_allocproc pages_alloc() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
465pages_freeproc pages_free() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
469bytes_emptyproc bytes_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
473bytes_lenproc bytes_len() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
477bytes_is_emptyproc bytes_is_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
481bytes_repeatproc bytes_repeat() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
485bytes_zeroproc bytes_zero() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
489bytes_fillproc bytes_fill() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
493bytes_sliceproc bytes_slice() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
497bytes_concatproc bytes_concat() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
501bytes_getproc bytes_get() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
505bytes_setproc bytes_set() -> int {Owns a concrete data shape or the operations that maintain it.
509bytes_equalproc bytes_equal() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
513memcmpproc memcmp() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
517memcpyproc memcpy() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
521memmoveproc memmove() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
525memsetproc memset() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
529memzeroproc memzero() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
533memchrproc memchr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
537memrchrproc memrchr() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
541buffer_newproc buffer_new() -> int {Owns byte movement or host I/O interaction.
545buffer_from_bytesproc buffer_from_bytes() -> int {Owns byte movement or host I/O interaction.
549buffer_is_emptyproc buffer_is_empty() -> int {Owns byte movement or host I/O interaction.
553buffer_remainingproc buffer_remaining() -> int {Owns byte movement or host I/O interaction.
557buffer_clearproc buffer_clear() -> int {Owns byte movement or host I/O interaction.
561buffer_reserveproc buffer_reserve() -> int {Owns byte movement or host I/O interaction.
565buffer_push_byteproc buffer_push_byte() -> int {Owns byte movement or host I/O interaction.
569buffer_appendproc buffer_append() -> int {Owns byte movement or host I/O interaction.
573buffer_sliceproc buffer_slice() -> int {Owns byte movement or host I/O interaction.
577buffer_to_bytesproc buffer_to_bytes() -> int {Owns byte movement or host I/O interaction.
581array_fill_intproc array_fill_int() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
585memory_stats_emptyproc memory_stats_empty() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
589memory_stats_from_heapproc memory_stats_from_heap() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
593memory_stats_percent_usedproc memory_stats_percent_used() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
597memory_format_sizeproc memory_format_size() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
601memory_check_blockproc memory_check_block() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
605memory_check_regionproc memory_check_region() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
609memory_zero_blockproc memory_zero_block() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
613memory_copy_blockproc memory_copy_block() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
617memory_domainsproc memory_domains() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
621memory_readyproc memory_ready() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
625library_metaproc library_meta() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
629memory_selftest_alignmentproc memory_selftest_alignment() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
633memory_selftest_bytesproc memory_selftest_bytes() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
637memory_selftest_heapproc memory_selftest_heap() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
641memory_selftest_arenaproc memory_selftest_arena() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
645memory_selftest_poolproc memory_selftest_pool() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
649memory_selftest_pagesproc memory_selftest_pages() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.
653memory_selftestproc memory_selftest() -> int {Represents one top-level surface in the file contract and should be read as part of the module boundary.

Integration boundaries

Within stdlib, this file should remain focused. If a future helper changes the host boundary, scheduling boundary, or data-shape boundary, it probably belongs in a neighbor module instead of being added here by convenience.

  • Family responsibility: Top-level map of the Vitte standard library and the responsibilities owned by each family.
  • Family architecture role: A realistic Vitte program usually starts in `core`, grows through `collections` or `data`, crosses textual boundaries with `json` or `encoding`, touches the host with `path` or `io`, and only then reaches system-facing families like `kernel`, `ffi`, `async`, or `threading`.

Composition guidance

Choose this module when

  • Choose memory.vitl when the main question is owned by this module rather than by transport, storage, orchestration, or user-interface code.
  • Domain values start in `core` and `strings`.
  • Grouped data moves through `collections` or `data`.
  • Structured export goes through `json` and `encoding`.
  • Filesystem or process interaction goes through `path`, `io`, `os`, or `sysinfo`.
  • Explicit runtime coordination goes through `async`, `threading`, `kernel`, or `ffi`.

Pause before extending it when

  • Avoid extending this file when the new helper mostly changes the boundary to host I/O, runtime coordination, or foreign integration instead of staying inside stdlib.
  • Check nearby modules such as GETTING_STARTED.vitl, core_alias.vitl, datetime.vitl before adding convenience wrappers here.

Relationship table

This table keeps the page closer to a real encyclopedia entry: a module is easier to understand when compared with its nearest alternatives in the same family.

NeighborProceduresData surfacesWhy compare it
GETTING_STARTED.vitl260Shares the same family boundary but carries a distinct slice of responsibility.
core_alias.vitl00Shares the same family boundary but carries a distinct slice of responsibility.
datetime.vitl13816Shares the same family boundary but carries a distinct slice of responsibility.
graphics.vitl50Shares the same family boundary but carries a distinct slice of responsibility.
mod.vit162Shares the same family boundary but carries a distinct slice of responsibility.
network/http.vitl42Shares the same family boundary but carries a distinct slice of responsibility.
network/socket.vitl52Shares the same family boundary but carries a distinct slice of responsibility.
network/udp.vitl32Shares the same family boundary but carries a distinct slice of responsibility.

Neighbor modules