score/baselibs : lib memory migration phase 1#130
Open
KrishaDeshkool wants to merge 6 commits intoeclipse-score:mainfrom
Open
score/baselibs : lib memory migration phase 1#130KrishaDeshkool wants to merge 6 commits intoeclipse-score:mainfrom
KrishaDeshkool wants to merge 6 commits intoeclipse-score:mainfrom
Conversation
faa773a to
b139b98
Compare
|
The created documentation from the pull request is available at: docu-html |
b139b98 to
52230bb
Compare
52230bb to
a003d6c
Compare
a003d6c to
597ba2f
Compare
597ba2f to
42e2ac4
Compare
42e2ac4 to
384f132
Compare
384f132 to
7448c82
Compare
7448c82 to
17bb3a5
Compare
interprocess_notification in the same package is already public and depends on interprocess_mutex, so the mutex is effectively accessible transitively. Making it explicitly public enables cross-repo consumers that need direct access to the mutex API.
string_literal, split_string_view, and string_comparison_adaptor have nothing to do with shared memory — they're generic string helpers that ended up in score/memory for historical reasons. Moved to score/string/ with proper namespaces: - score::memory::LazySplitStringView → score::string::LazySplitStringView - score::memory::StringComparisonAdaptor → score::string::StringComparisonAdaptor Old targets in score/memory/BUILD are now aliases with deprecation. All consumers updated (json, log, tracing).
…/concurrency/atomic atomic_indirector is a mockable indirection layer for std::atomic — it has nothing to do with shared memory. Used by safecpp/safe_atomics, mw/log/wait_free_stack, and tracing. Moved to score/concurrency/atomic/ with proper namespace: - score::memory::shared::AtomicIndirectorReal → score::concurrency::atomic::AtomicIndirectorReal - score::memory::shared::AtomicMock → score::concurrency::atomic::AtomicMock Old targets in score/memory/shared/BUILD are aliases to the new location. All consumers updated (safecpp, log, tracing, memory_region_map).
detail::do_allocation_algorithm() is a pure math function (~5 lines, just calls std::align). It lived in shared_memory_resource.h which meant fake_memory_resources (test doubles) pulled in the entire SHM syscall layer just to use this one function. Extracted into score/memory/shared:allocation_algorithm with minimal deps (only pointer_arithmetic_util). Updated fake_memory_resources to depend on allocation_algorithm instead of shared_memory_resource.
:types was a grab-bag aggregate that bundled 10+ targets. Consumers that only needed one or two were pulling in everything. This causes duplicate symbols when communication has its own copy of these targets and both get linked through transitive deps. Replaced with specific targets each consumer actually uses: - chunk_list: managed_memory_resource + vector - flexible_circular_allocator: managed_memory_resource + offset_ptr - interface_types: i_shared_memory_resource + managed_memory_resource - container tests: managed_memory_resource + offset_ptr + polymorphic_offset_ptr_allocator Also narrowed i_shared_memory_resource dep from :types to :managed_memory_resource (only header it actually includes).
17bb3a5 to
72f9b56
Compare
The canonical maintained copy of score/memory/shared now lives in the communication repo. These targets are frozen — kept only for backward compatibility with existing baselibs consumers (tracing, containers). Every cc_library target now has a deprecation warning telling users to migrate to @score_communication//score/memory/shared. Also made user_permission, shared_memory_error, and shared_memory_test_resources visibility public so communication can alias them without cross-repo visibility issues. See score/memory/shared/README.md for full migration context.
72f9b56 to
cd5c0e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR deprecates all the targets in lib/memory/shared and it will be moved to com repo.
when users builds they would get the deprecation warning to move to com repo.
Note: This does not remove anything from the baselibs yet.