forked from OSchip/llvm-project
3eb16fe4e9
Previously, the SpecificAllocator was a static local in the `make<T>` function template. Using static locals is nice because they are only constructed and registered if they are accessed. However, if there are multiple calls to make<> with different constructor parameters, we would get multiple static local variable instances. This is undesirable and leads to extra memory allocations. I noticed there were two sources of DefinedRegular allocations while checking heap profiles. |
||
---|---|---|
.. | ||
Common | ||
Core | ||
ReaderWriter |