mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
Add a function ‘valueSize’
It returns the size of value, including all other values and environments reachable from it. It is intended for debugging memory consumption issues.
This commit is contained in:
parent
68cf98c4d2
commit
eff120d1b9
4 changed files with 99 additions and 2 deletions
|
@ -159,4 +159,10 @@ static inline void mkPathNoCopy(Value & v, const char * s)
|
|||
void mkPath(Value & v, const char * s);
|
||||
|
||||
|
||||
/* Compute the size in bytes of the given value, including all values
|
||||
and environments reachable from it. Static expressions (Exprs) are
|
||||
not included. */
|
||||
size_t valueSize(Value & v);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue