eclipse-iceoryx / eclipse-iceoryx/iceoryx2

Introduce `Rc` with custom allocator

Open
#101 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.5k
Forks
185
Avg merge
1d 23h
Merged PRs (30d)
47

Description

## Brief feature description

With the `Rc` approach in #100 we introduced heap usage. We need a central construct that owns a custom allocator and provides the allocator to the underlying constructs, namely `Rc`.

Therefore, we need an `Rc` that can be created with `Rc::new_in` and acquires the memory from the custom allocator. See the new `allocator_api` of rust, https://github.com/glandium/allocator_api/ and https://doc.rust-lang.org/std/rc/struct.Rc.html#method.new_in

By default, the `iceoryx2-bb-posix::heap_allocator::HeapAllocator` shall be used. The used allocator trait shall be `iceoryx2-bb-elementary::allocator::BaseAllocator`.

Contributor guide

Open the contributing guide

Research direction

Start by reading the Rc approach in issue #100, then compare Rust's allocator_api and Rc::new_in behavior. Trace how iceoryx2-bb-posix::heap_allocator::HeapAllocator and iceoryx2-bb-elementary::allocator::BaseAllocator are intended to interact with Rc. Done means Rc::new_in acquires memory from the supplied custom allocator and uses HeapAllocator by default.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.