roc/src/base
Brendan Hansknecht 1beda4275d
use the debug allocator in Debug and ReleaseSafe
This will help us cache any accidentally memory bugs like leaks or double frees.
Added cause I hit:
```
roc(57273,0x1fd0d9f00) malloc: double free for ptr 0x140058000
roc(57273,0x1fd0d9f00) malloc: *** set a breakpoint in malloc_error_break to debug
```

Impl just taken from https://ziglang.org/download/0.14.0/release-notes.html#SmpAllocator with minor modifications.
2025-10-15 16:25:45 -07:00
..
CommonEnv.zig Fix ModuleEnv 32-bit serialization 2025-10-12 19:21:42 -04:00
DataSpan.zig Fix lints 2025-08-11 11:46:05 -04:00
Ident.zig WIP 2025-08-11 12:13:25 +10:00
mod.zig use the debug allocator in Debug and ReleaseSafe 2025-10-15 16:25:45 -07:00
PackedDataSpan.zig WIP 2025-08-10 11:40:44 +10:00
parallel.zig WIP 2025-08-10 11:40:44 +10:00
README.md Update README's 2025-08-12 18:26:26 +10:00
Region.zig refactor to use Zig modules 2025-07-18 14:30:52 +10:00
RegionInfo.zig WIP 2025-08-10 11:40:44 +10:00
safe_memory.zig WIP 2025-08-10 11:40:44 +10:00
Scratch.zig Process type decls separately, generalize, then inst in annos 2025-09-30 17:44:45 -04:00
SExprTree.zig remove exitOnOom 2025-07-14 15:07:44 +10:00
SmallStringInterner.zig WIP 2025-08-11 12:13:25 +10:00
StringLiteral.zig WIP 2025-08-11 12:13:25 +10:00
target.zig WIP 2025-08-10 11:40:44 +10:00

Base

Foundation utilities and common functionality used throughout the Roc compiler.

Overview

The base module provides essential utilities, data structures, and abstractions that are used across multiple stages of the Roc compiler. It serves as a shared foundation that other modules depend on.

Purpose

This module provides:

  • Common Data Structures: Shared data structures and collections used throughout the compiler
  • Memory Management: Safe memory allocation and management utilities
  • Parallel Processing: Utilities for parallel execution and work distribution
  • Error Handling: Common error types and error handling patterns
  • Debugging Support: Debugging and logging utilities
  • Platform Abstractions: Cross-platform abstractions for common operations