mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
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. |
||
|---|---|---|
| .. | ||
| CommonEnv.zig | ||
| DataSpan.zig | ||
| Ident.zig | ||
| mod.zig | ||
| PackedDataSpan.zig | ||
| parallel.zig | ||
| README.md | ||
| Region.zig | ||
| RegionInfo.zig | ||
| safe_memory.zig | ||
| Scratch.zig | ||
| SExprTree.zig | ||
| SmallStringInterner.zig | ||
| StringLiteral.zig | ||
| target.zig | ||
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