-
Hello @nrnhines I am trying to optimize the memory usage of a Python process that creates ~100K hoc objects. Ideally it is better to get the size of each single hoc object and multiplies, so that I can estimate the overall memory consumption. The scenario is similar as follows. The hoc object is defined by
which creates a point process syn1.mod and another hoc On the Python side, I am using
The output is
The values seems not right, i guess because
The output is
seems consistent with the size of python float Is there a better way to measure the size of a complex hoc object in Python or in Neuron? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Perhaps
|
Beta Was this translation helpful? Give feedback.
-
Thanks @nrnhines !
|
Beta Was this translation helpful? Give feedback.
Perhaps
h.nrn_malinfo(1)
can help. (missing from nrn.readthedocs.io but see the end of nrn/src/oc/symbol.cpp)The return values just need a bit of thoughtful interpretation, e.g.