Releases: SlickQuant/slick-shm
Releases · SlickQuant/slick-shm
Release v0.1.4
Changes
Added
- Add
is_creator()method toshared_memoryclass to determine if the object created the segment or opened existing- Returns
trueif the object created the shared memory,falseif it opened existing - Useful for conditional initialization and cleanup responsibilities
- Works with all creation modes:
create_only,open_existing,open_or_create,open_always - Creator status is preserved during move operations
- Windows: Tracks via
GetLastError() != ERROR_ALREADY_EXISTSafterCreateFileMapping() - POSIX: Returns existing
owns_shm_flag value
- Returns
- Add comprehensive test suite for
is_creator()functionality (10 new test cases intest_is_creator.cpp)- Tests all creation modes
- Tests move constructor and move assignment semantics
- Tests no-throw constructors
- Tests invalid objects
- Add detailed API documentation for
is_creator()indocs/api_reference.mdwith usage examples - Add feature to README features list
Release v0.1.3
Changes
Fixed
- Add missing
<type_traits>include inerror.hppto fix compilation with strict compilers - Fix Windows handle validation in
create(),open(), andmap_impl()to properly check for both NULL and INVALID_HANDLE_VALUE - Add missing
error.hppandtypes.hppincludes inplatform.hppto resolve dependency issues - Add documentation comment to POSIX
format_name()clarifying preconditions - Fix Windows UTF-8 to UTF-16 name conversion buffer sizing in shared memory mapping
- Fix POSIX create/open_or_create/open_always logic to avoid unlinking existing segments and to allow read-only open_or_create
- Reject POSIX shared memory name of '/' and add tests for read-only create/open_or_create and slash-only name validation
- Fix unsafe atomic initialization in
advanced_syncexample (removed placement new on std::atomic in shared memory) - Fix memory ordering in
advanced_syncexample initialization (use release semantics instead of relaxed) - Fix potential cleanup race condition in
advanced_syncexample (explicit close before remove)
Improved
- Add comprehensive alignment documentation for
data()method (Windows 64KB, POSIX 4KB guarantees) - Enhance
size()method documentation about platform-specific size rounding behavior - Add no-resize policy documentation with rationale and alternatives
- Improve error messages in
basic_writerandbasic_readerexamples to include operation context and shared memory names
Documentation
- Document Windows 64KB allocation granularity and POSIX 4KB page alignment guarantees
- Explain that actual allocated size may exceed requested size due to page rounding
- Clarify why resizing is not supported (Windows CreateFileMapping limitation)
- Add examples of better error handling patterns with contextual error messages
Release v0.1.2
Changes
- Rename repository from slick_shm to slick-shm (hyphenated naming follows recommended convention)
- Update documentation and build references to use new repository name
Release v0.1.1
Changes
- Fix Linux build enum multiple definition error
- Add CHANGELOG.md
- Add version number cmake message
Release v0.1.0
slick_shm v0.1.0
A modern C++17 header-only, cross-platform shared memory library.
Installation
vcpkg
vcpkg install slick-shmCMake FetchContent
FetchContent_Declare(
slick_shm
GIT_REPOSITORY https://github.com/SlickQuant/slick_shm.git
GIT_TAG v0.1.0
)
FetchContent_MakeAvailable(slick_shm)
target_link_libraries(your_target PRIVATE slick::shm)Header-Only
Download the slick_shm-0.1.0-headers.zip from the Assets below, extract it, and copy the slick/ directory to your project's include path.
Platform Support
- ✅ Windows (MSVC 2017+, MinGW)
- ✅ Linux (GCC 7+, Clang 5+)
- ✅ macOS (Apple Clang)
Full Changelog: https://github.com/SlickQuant/slick_shm/commits/v0.1.0