Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.0 - 2026-05-09
Added
iommap:region_binary/3returns a refcounted resource binary that points directly into the mapped region, with no data copy. Intended for hot zero-copy hand-off paths.
Changed
- The NIF resource layout was split into a
mappingresource (owns the mmap region and fd) and ahandleresource (owns the BEAM handle term and one reference to the mapping).close/1releases the handle's reference to the mapping;munmapandclose(fd)are deferred until any outstanding region binaries derived from that mapping are also garbage collected. Existing API behaviour is unchanged. truncate/2now allocates a fresh mapping (with a duplicated fd) and atomically swaps it into the handle. The previous mapping remains alive for outstanding region binaries.
Notes
region_binary/3is unsafe against external truncation that shrinks past a binary's range. Usepread/3when safety against external mutation is required.
1.0.0 - 2026-01-26
Added
- Initial release of iommap
- Dirty NIF I/O schedulers for all I/O operations
- Cross-platform memory-mapped file I/O for Erlang/OTP
- Support for Linux, macOS, FreeBSD, and OpenBSD
- Core operations:
open/2,3,close/1,pread/3,pwrite/3 - Synchronization:
sync/1,2with sync/async modes - File management:
truncate/2,position/1 - Memory advice:
advise/4with madvise hints - Thread-safe implementation using pthread rwlocks
- SIGBUS protection for external file truncation
- Platform-specific optimizations:
MAP_POPULATEsupport on LinuxMAP_NOCACHEsupport on macOSfallocateon Linux,posix_fallocateon BSD
- Comprehensive test suite with 20 tests
- CI pipeline for all supported platforms