[PATCH] D109499: [DebugInfo][NFC] Erase capacity in DWARFUnit::clearDIEs().
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 10:29:03 PDT 2021
avl added a comment.
I used clearDIEs() in this patch https://reviews.llvm.org/D96035 and observed that memory is not freed. Looking at the reason I found that shrink_to_fit() does not change a capacity and as the result the memory stay used.
The use case in D96035 <https://reviews.llvm.org/D96035> is: load dies of DWARFUnit, clone dies to output, clean loaded dies by calling DWARFUnit::clear().
The comment says that it is not guaranteed that capacity would be reduced:
/** A non-binding request to reduce capacity() to size(). */
void
shrink_to_fit()
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109499/new/
https://reviews.llvm.org/D109499
More information about the llvm-commits
mailing list