[Lldb-commits] [PATCH] D47492: DWARFUnit::m_die_array swap()->shrink_to_fit()

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 5 01:48:26 PDT 2018


jankratochvil added a comment.

In https://reviews.llvm.org/D47492#1121543, @dblaikie wrote:

> Happy to help explain it - which part(s) are you having a bit of trouble with?


What's wrong on this implementation <https://people.redhat.com/jkratoch/incredibleshrinkingvector.C>?

> It seems like the main one is that the implementation can't be sure that malloc was used to allocate the memory - since the global allocation function can be replaced & there's no convenient way to detect that.

The example above does verify whether the vector uses default libstdc++ std::allocator which uses libstdc++ ::operator new which uses malloc().


Repository:
  rL LLVM

https://reviews.llvm.org/D47492





More information about the lldb-commits mailing list