How Do I Obtain the Memory Size of the lyd_node? #2296
-
I need to collect statistics on the memory usage of a single lyd_node or the entire tree node. Is there any method to obtain or calculate the memory usage? Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
michalvasko
Sep 9, 2024
Replies: 1 comment
-
Generally, you should use a memory measuring tool such as |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zhangtaog
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generally, you should use a memory measuring tool such as
massif
. But to answer, you get the memory usage of a singlestruct lyd_node *node
by callingsizeof(*node)
.