mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 13:36:02 +01:00
libexpr: Clear PosTable contents in EvalState::resetFileCache
Otherwise PosTable grows indefinitely for each reload. Since the total input size is limited to 4GB (uint32_t for byte offset PosIdx) it can get exhausted pretty. This ensures that we don't waste memory on reloads as well.
This commit is contained in:
parent
479b6b73a9
commit
a091a8100a
2 changed files with 11 additions and 0 deletions
|
|
@ -1113,6 +1113,7 @@ void EvalState::resetFileCache()
|
|||
importResolutionCache->clear();
|
||||
fileEvalCache->clear();
|
||||
inputCache->clear();
|
||||
positions.clear();
|
||||
}
|
||||
|
||||
void EvalState::eval(Expr * e, Value & v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue