Skip to content

Memory Foundation Update#5

Merged
jamon-bailey merged 140 commits into
v0.xfrom
proc-threads
May 20, 2026
Merged

Memory Foundation Update#5
jamon-bailey merged 140 commits into
v0.xfrom
proc-threads

Conversation

@jamon-bailey
Copy link
Copy Markdown
Member

Process-Level Memory Infrastructure

Establishes the foundational layer of Chevron's hierarchical memory system. This introduces the process-wide memory pool (the root-level block dispenser that all downstream memory components will draw from) along with its supporting infrastructure for OS memory acquisition, chunk tracking, and thread-local caching.

The pool distributes fixed-size blocks through a lock-free embedded free list backed by ABA-safe 16-byte compare-and-swap, with platform-specific atomic intrinsics ensuring genuine lock-free behavior across all target platforms. Each thread maintains a local cache to mitigate contention on the shared free list, and an atomic expansion gate prevents redundant OS allocations when multiple threads exhaust the pool simultaneously.

Supporting types introduced here — memory descriptions, region handles, chunk descriptors, tagged pointers, the atomic free list, and the scope guard — are designed for reuse across the broader memory hierarchy as it develops.

jamon-bailey and others added 30 commits April 1, 2026 00:57
Added the incomplete ThreadingEngine class and its corresponding source file; Removed the obsolete src/process/program/runtime.cpp and update src/process/CMakeLists.txt to use thread_engine.cpp instead of runtime.cpp; Incomplete class implementation
Introduce MemoryCore skeleton, implementation details remain incomplete and will be implemented in a follow-up.
Renamed the previous ThreadingEngine class to ThreadingCore and updated file name; All relevant references updated
Resources being studied for the implementation of a process-wide fixed-size memory block pool.
Added skeletons for process-wide MemoryPoolConfig and ProcessMemoryPool. Both are incomplete stubs; Update src/process/CMakeLists.txt to include the new source files
Prematurely adding necessary header dependency
Appended a comment block to dev_exe.cpp about potential debug-mode bad-address/sentinel values (several hex patterns and their decimal equivalents)
Annotate MemoryPoolConfig structure with CHEVRON_API to ensure proper symbol visibility from the shared library/object; Implementation remains incomplete
Added skeleton for strongly-typed DigitalSize template as a stub; Still incomplete
Moved digital size measurement facilities to 'include/chevron/common/units/digital' subdirectory; Implementation STILL INCOMPLETE
Add include/chevron/common/units/digital/unit_cast.hpp which introduces DigitalSizeCast, a constexpr template utility to convert between digital size unit types
Introduce a general units include header that centralizes unit-measure facilities; This front-facing header is still INCOMPLETE
Temporary 'size_t' references to be replaced with explicit unit types; Incomplete
Compile-time and runtime math utilities
Introduces an alignment and bit inspection header; Both headers incomplete
Adjustments to documentation comments
Introduce arithmetic and compound operators for DigitalSize; Moved class type traits above class definition
Replace raw size_t fields with unit-safe Bytes for block_size, chunk_size, and budget_ceiling in MemoryPoolConfig; Other fields and structure remain unchanged
Rolling example of application implementation with Chevron
Incomplete documentation
Added validation method stubs for process memory pool configuration; Incomplete implementation
jamon-bailey and others added 21 commits May 16, 2026 01:57
Replaced placeholder TODO documentation with concrete descriptions for two memory types. chunk_descriptor.hpp now documents ChunkDescriptor as a non-copyable OS allocation tracker that records chunks acquired from the OS and enforces single-location residency within allocator tracking structures. region.hpp now documents MemoryRegion as a lightweight, freely copyable handle describing contiguous memory regions with no ownership semantics. These changes are documentation-only and clarify intent and ownership semantics in the headers.
Improved documentation in tagged_ptr.hpp.

Describe TaggedPointer as an ABA-safe tagged pointer pairing a typed pointer with a monotonically increasing modification counter for lock-free CAS operations.

No functional code changes.
Replaced placeholder TODO with detailed documentation for MemoryPoolConfig. Clarifies that the config defines how process memory is shaped, budgeted, and distributed to threads.
Updated details of ProcessMemoryAllocator class documentation
- Extend callable_signature in include/chevron/utility/function/type_traits.hpp to handle noexcept callables. Added specializations for non-const noexcept and const noexcept member functions, and for noexcept free functions.

- Introduced IsNoexcept_t typedef (true_type/false_type) and IsNoexcept_v static constexpr for querying noexcept-ness, and adjusted existing specializations to expose IsNoexcept_t (and IsNoexcept_v where appropriate).
Update callable_signature specializations to expose boolean trait flags and a member-method type alias
Added general purpose void return signature verification concept
Add compile-time constraint to ScopeGuard's template parameter by including chevron/utility/function/concepts.hpp and using func::concepts::void_return_call for LambdaT.
Output short summary of target platform on configuration
Invoke target platform summary script on project configuration
Removed placeholder TODO documentation blocks from several memory and process/memory source files to clean up source file headings
Renamed the summary macro from output_host_summary to output_target_platform_summary and update its invocation in CMakeLists.txt
No need for this source file at the moment
Removed double-quotes from around flag names
Process-Level Memory Authority
@jamon-bailey jamon-bailey added this to the Structural Foundations milestone May 19, 2026
@jamon-bailey jamon-bailey self-assigned this May 19, 2026
@jamon-bailey jamon-bailey added the Update An update for the main branch label May 19, 2026
jamon-bailey and others added 4 commits May 19, 2026 01:33
Fixed stale file names being referenced after previously resolving conflicts across 'proc-memory' -> 'proc-threads' pull request
Fixes linker error encountered on certain build presets
Adjusted lock-free capability detection to be compatible across GCC and Clang, as well as compatibility across Clang versions
Adjusted lock-free detection method to use static checks on supporting members rather than runtime checks. 8-byte types should always be lock-free on modern hardware
@jamon-bailey jamon-bailey merged commit 83bbb3c into v0.x May 20, 2026
10 checks passed
@jamon-bailey jamon-bailey deleted the proc-threads branch May 20, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Update An update for the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant