Give an ETS table with data, the info/1 function returns various properties for the table, including a size value which is specific to the number of rows rather than the physical size.
Is there any way to calculate the amount of memory in bytes occupied by an ETS table ?
ets:new( mytable, [bag, named_table, compressed]),
ets:insert( mytable, { Key, Value } ),
....
ets:info ( mytable ).
you can read the document about ets.
you can ues this to get the memory allocated to the table. ets:info ( mytable, memory).
Not the answer you're looking for? Browse other questions tagged erlang ets or ask your own question.
asked
viewed
2,799 times
active
5 years, 1 month ago
Linked
Related
Hot Network Questions