panda-re / panda

Platform for Architecture-Neutral Dynamic Analysis
https://panda.re
Other
2.5k stars 479 forks source link

Reduce memory usage when LLVM is enabled. #1535

Closed MarkMankins closed 1 month ago

MarkMankins commented 1 month ago

Function pass manager objects were being created, but never destroyed.

When a function pass manager object is destroyed, it destroys all pass objects that have been registered. Previously pass objects were being reused, which is why the pass managers were never being freed, but this results in a large memory leak. This commit shuffles things around so the pass managers can be freed.

a891

AndrewFasano commented 1 month ago

Thanks Mark!