[PATCH] D52126: Discard uncompressed buffer after creating .gdb_index contents.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 16:14:20 PDT 2018


dblaikie added a comment.

*nod* It might be possible to (maybe too low-level - not sure if zlib
exposes this, or if the format even allows it to be efficiently answered)
retrieve the size of a compressed section without decompressing it (at
least in zlib-gnu fromat, I think the uncompressed size is written before
the compressed data, so easy there) - that way maybe more things wouldn't
need to care about whether it was compressed or not - it could be
decompressed lazily (& then the other half would be to deallocate promptly,
as soon as those bytes were finished with/written out to the output and no
longer needed).

At some point, it'd be even great to use streaming compression in and out.
(I guess you could probably even use streaming decompression for the
pubnames - so even a whole object file's pubnames wouldn't need to be
decompressed simultaneously - just ask for the next chunk of decompressed
data, process it, then overwrite it with the next chunk, etc).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52126





More information about the llvm-commits mailing list