[Openmp-commits] [PATCH] D85274: [OpenMP] Introduced a bump-like allocator into the target memory management

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 24 13:51:21 PDT 2020


JonChesterfield added a comment.

The reference counting to free is interesting. I don't think I've seen that on a bump allocator before. It doesn't allow memory reuse within a slab. I wonder whether there is usually some outstanding reference into the slab for most of the execution.

A common allocator pattern is a variant on N allocators, each for a fixed size. That makes alloc/free a stack operation, where you free the whole block if the stack becomes empty. Alloc as cheap as here, incremental free possible. Cost is the unused parts of the stack.

Go much beyond that, into allocating from the next size up etc, and one ends up with a heap. It's possible that's the end point here - do we actually just want malloc?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85274/new/

https://reviews.llvm.org/D85274



More information about the Openmp-commits mailing list