Skip to content

Free unmaps memory on macOS#42

Merged
spatulari merged 1 commit into
rux-lang:devfrom
FeliceMente:macos-munmap
Jun 14, 2026
Merged

Free unmaps memory on macOS#42
spatulari merged 1 commit into
rux-lang:devfrom
FeliceMente:macos-munmap

Conversation

@FeliceMente

Copy link
Copy Markdown
Contributor

Replaces the macOS Std::Memory::Free no-op with a real implementation: it reads the size header written by Alloc and calls Munmap(base, size + HeaderSize), mirroring the Linux/BSD branches. Realloc (Alloc+Copy+Free) is fixed automatically.

Depends on the Munmap binding (rux-lang/MacOS#4) and thunk (rux-lang/Rux#132). Verified end-to-end: a 1,000,000 x 1 MiB alloc/free loop completes (previously exhausted the address space) and a Realloc grow preserves data.

@spatulari spatulari merged commit 71c348a into rux-lang:dev Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants