default GC can do a sort of heap dump via -d:nimTypeNames and dumpNumberOfInstances()
This commit is contained in:
parent
9753782f96
commit
823fbd4e40
3 changed files with 37 additions and 3 deletions
|
|
@ -88,6 +88,12 @@ type
|
|||
deepcopy: proc (p: pointer): pointer {.nimcall, benign.}
|
||||
when defined(nimTypeNames):
|
||||
name: cstring
|
||||
nextType: ptr TNimType
|
||||
instances: int # count the number of instances
|
||||
sizes: int # sizes of all instances in bytes
|
||||
PNimType = ptr TNimType
|
||||
|
||||
when defined(nimTypeNames):
|
||||
var nimTypeRoot {.codegenType.}: PNimType
|
||||
|
||||
# node.len may be the ``first`` element of a set
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue