All 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.
- Stream metadata now includes revision/ack tracking to prevent missed unread-update signaling when writers outpace reader acknowledgements
- Stream writer serialization lock and reader snapshot consistency checks to avoid torn reads under concurrent writers
- Queue producer serialization lock to prevent concurrent producer slot/index races
- Queue consumer serialization lock to prevent concurrent consumer read-index races
- Regression test coverage for Issue #3 behavior and concurrent writer/producer coherence
- New
lsm_benchcontention benchmark executable and top-levelmake benchcommand - CI benchmark execution on
ubuntu-latestmatrix leg
- Stream wire layout metadata changed from
|flags|size|data|to an extended metadata header (flags + revision + ack + size + lock + data) - Queue metadata header expanded to include producer and consumer lock state
hasNewData()no longer drops unread updates when multiple writes occur beforemarkAsRead()- Concurrent stream writers no longer produce mixed/torn payload snapshots in stress tests
- Concurrent queue producers no longer corrupt message prefixes or race write index updates in stress tests
- Concurrent queue consumers no longer race read-index updates in stress tests
- Expected performance impact: slight to moderate throughput drop in write-heavy workloads due to writer/producer/consumer lock serialization under contention
- Typical impact is low for single-writer/single-producer use, and higher under heavy contention where correctness is now prioritized
- This is a wire-layout breaking change for stream and queue metadata
- Existing processes built against the old in-memory format must not interoperate with this new build until all participants are updated together
- Makefile with
build,test,clean,examplesandsetuptargets wrapping CMake - Re-verified current macOS aarch64 (Apple Silicon) support on Sequoia 15.7.3
- New test case on
Memoryaccessors,getWriteFlagslogic,std::spanwrite overloads, segment overwrite, queue capacity=1 edge case,maxMessageSizeboundary and concurrent writing; also added docs to understand the tests better .vscode/c_cpp_properties.jsonfor C++20 IntelliSense on macOS (arm64/aarch64)- No-flake stability test: re-runs the full suite 1000 times as subprocesses to catch timing-dependent failures (cross-platform, skips itself via
LSM_NOFLAKEenv var) - Added
macos-latestto GitHub Actions CI matrix withLSM_NOFLAKE=1to skip the 1000-iteration flake test in CI example/directory with three runnable examples: stream transfer (C++), message queue (C++), and raw shared memory (C vialsm_cwrapper)make examplestarget to build and run all examples- Pure C wrapper (
lsm_c.h/lsm_c.cpp) exposingMemoryas opaque-handle C functions - Rust FFI bindings (
ffi/rust/) with safeSharedMemorywrapper, unit tests, and runnable example ffi/rust/Makefilewithsetup,build,test,example, andcleantargets- Zig FFI bindings (
ffi/zig/) with idiomaticSharedMemorywrapper, unit tests, and runnable example (Zig 0.15+) ffi/zig/Makefilewithsetup,build,test,example, andcleantargets- Go FFI bindings (
ffi/go/) via cgo withSharedMemorywrapper, unit tests, and runnable example ffi/go/Makefilewithsetup,build,test,example, andcleantargets
- Improved README: added supported platforms table, building instructions, tightened examples and documentation
- Added more detailed documentation for
SharedMemoryQueueand Windows persistency features in README - Added Makefile to simplify setup, build and test processes for developers
- README: added screenshot, pure C example with
lsm_cwrapper
- Linux: Default permissions set to 0777.
- Windows: ACL inheritance for shared file, clean close/reopen when applying settings.
- SharedMemoryQueue: New FIFO message queue functionality for inter-process communication
- Thread-safe enqueue/dequeue operations using atomic counters
- Configurable capacity and maximum message size
peek()method to inspect messages without removing them- Status methods:
isEmpty(),isFull(),size(),capacity() - Supports single producer/single consumer and single producer/multiple consumers patterns
- Windows persistency support for shared memory segments
- Persistent file-backed shared memory on Windows using
%PROGRAMDATA%/shared_memory/directory - Automatic directory creation and permission management on Windows
- Configurable persistence with
persistparameter in constructor
- Persistent file-backed shared memory on Windows using
- Updated C++20 requirements with
std::atomicsupport for queue operations - Improved memory layout with atomic operations for queue counters
- Enhanced Windows implementation with better file handle management
- Memory leak prevention in queue implementation
- Proper cleanup of shared memory on all platforms
Prior to version 1.7.0, the library supported:
- Basic shared memory creation and access on Windows, Linux, and macOS
- Stream-based data transfer with
SharedMemoryWriteStreamandSharedMemoryReadStream - Support for
std::string,float*, anddouble*array types - Change detection with flag bit flipping
- Single value access via
.data()[index]API