[all-commits] [llvm/llvm-project] 11d1aa: [COFF] Free some memory used for chunks

Reid Kleckner via All-commits all-commits at lists.llvm.org
Mon Jun 1 18:52:05 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 11d1aa0bcc1197f1b3010171b02c6e9662f34b75
      https://github.com/llvm/llvm-project/commit/11d1aa0bcc1197f1b3010171b02c6e9662f34b75
  Author: Reid Kleckner <rnk at google.com>
  Date:   2020-06-01 (Mon, 01 Jun 2020)

  Changed paths:
    M lld/COFF/InputFiles.cpp
    M lld/COFF/InputFiles.h

  Log Message:
  -----------
  [COFF] Free some memory used for chunks

First, do not reserve numSections in the Chunks array. In cases where
there are many non-prevailing sections, this will overallocate memory
which will not be used.

Second, free the memory for sparseChunks after initializeSymbols. After
that, it is never used.

This saves 50MB of 627MB for my use case without affecting performance.




More information about the All-commits mailing list