Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ben-clayton opened this issue May 20, 2020 · 2 comments
Open

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

ben-clayton opened this issue May 20, 2020 · 2 comments

Comments

@ben-clayton
Copy link
Contributor

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.

ben-clayton added a commit to ben-clayton/marl that referenced this issue Jun 5, 2020
`StlAllocator` uses a `marl::Allocator` for performing the allocations,
avoiding untracked heap allocations.

Issue: google#131
ben-clayton added a commit to ben-clayton/marl that referenced this issue Jun 5, 2020
`StlAllocator` uses a `marl::Allocator` for performing the allocations,
avoiding untracked heap allocations.

Issue: google#131
ben-clayton added a commit to ben-clayton/marl that referenced this issue Jun 5, 2020
`StlAllocator` uses a `marl::Allocator` for performing the allocations,
avoiding untracked heap allocations.

Issue: google#131
ben-clayton added a commit to ben-clayton/marl that referenced this issue Jun 5, 2020
`StlAllocator` uses a `marl::Allocator` for performing the allocations,
avoiding untracked heap allocations.

Issue: google#131
ben-clayton added a commit that referenced this issue Jun 5, 2020
`StlAllocator` uses a `marl::Allocator` for performing the allocations,
avoiding untracked heap allocations.

Issue: #131
@benvanik
Copy link

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
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants