Skip to content

Ensure that all heap allocations use the marl::Allocator #131

Open
@ben-clayton

Description

marl::Allocator is the user-implementable interface that should be used for all marl heap allocations.

At the time of writing there are many places where we use std containers with the default allocator, which is clearly bypassing the marl::Allocator.

We should ensure that all allocations go through the provided marl::Allocator.

Activity

benvanik

benvanik commented on Jul 10, 2020

@benvanik

RE shared_ptr; this may be useful: https://github.com/google/iree/blob/main/iree/base/ref_ptr.h (thread-safe intrusive pointer with support for type-specific custom deleters to make pooling easier)

AWoloszyn

AWoloszyn commented on Dec 17, 2022

@AWoloszyn

This pull request also replaces std::function with std::packaged_task. std::packaged_task can take an allocator which will help with some of this as well.
#216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Ensure that all heap allocations use the marl::Allocator · Issue #131 · google/marl