1
0
Fork 0
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:
Eelco Dolstra 2014-09-22 14:46:42 +02:00
parent 68cf98c4d2
commit eff120d1b9
4 changed files with 99 additions and 2 deletions

View file

@ -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);
}