Skip to content

Dynamic Subscription (REP-2011 subset): BONUS: Allocator Refactor #1405

@methylDragon

Description

@methylDragon

Description

No long detailed description this time, unfortunately...

This issue describes and lists the relevant PRs that build on top of the PRs in #1374 with non-essential, bonus changes for ease of review and decoupling.

The base PRs should be prioritized.

The PRs in #1374 assumed that most of the objects being introduced can only live on the heap, but this wave of PRs allows those objects to be created on the stack and then initialized.

The changes here are namely refactors across the entire stack for function signatures to take in allocators, and splitting of create() functions into init() and create() (likewise for destroy into fini() and destroy().)

That is, splitting the steps of:

  • Allocating an outer struct (create/new)
  • Allocating and initializing the internal members of that struct (init)

And similarly for destruction:

  • Deallocating the outer struct (delete/destroy)
  • Deallocating and finalizing the internal members of that struct (fini)

NOTE

These changes will be occurring mostly in the rmw and rosidl layers

Relevant PRs

TODOs

I might not get all of them, but wow am I going to try:
(Note: Edits in each lower level struct will need changes propagated upwards, but the higher level structs are what users are more likely to interact with.)

  • Message Type Support
    • rosidl_message_type_support_t
    • rosidl_dynamic_message_type_support_impl_t
  • Dynamic Type Support
    • rosidl_dynamic_typesupport_serialization_support_t
      • getting this in means all dynamic typesupport types will have access to a user-configured allocator via their composed serialization supports (but doesn't yet unlock the ability to have independent allocators from the serialization support)
    • rosidl_dynamic_typesupport_dynamic_type_t
    • rosidl_dynamic_typesupport_dynamic_type_builder_t
    • rosidl_dynamic_typesupport_dynamic_data_t
  • Dynamic Type Support Impls (Do these even make sense to take allocators? 🤔 I don't think I will support them)
    • rosidl_dynamic_typesupport_serialization_support_impl_t
    • rosidl_dynamic_typesupport_dynamic_type_impl_t
    • rosidl_dynamic_typesupport_dynamic_type_builder_impl_t
    • rosidl_dynamic_typesupport_dynamic_data_impl_t
  • Type Description Utils
    • This is a whole bunch of stuff... I might not get to this
  • rclcpp (I'm not even going to think about this one yet)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions