Redian新闻
>
How to know the size of a java object ?
avatar
g*g
2
why do you want to know?

【在 l****2 的大作中提到】
: rt
avatar
w*r
4
serialize and save to database:D

【在 g*****g 的大作中提到】
: why do you want to know?
avatar
a*e
5
既然存到数据库,打开看看不就知道有多大了?

【在 w*r 的大作中提到】
: serialize and save to database:D
avatar
g*g
6
You can write any serialized object into byte array,
then you certainly know how big it is.

【在 w*r 的大作中提到】
: serialize and save to database:D
avatar
c*t
7
Hehe, this size would be quite different from the actual object
size. Since it would include String and other referened objects.
LZ needs to clarify.

【在 g*****g 的大作中提到】
: You can write any serialized object into byte array,
: then you certainly know how big it is.

avatar
l*2
8
i want to find a way to monitor the heap usage

【在 g*****g 的大作中提到】
: why do you want to know?
avatar
g*g
9
That's not a good way, find a profiler.

【在 l****2 的大作中提到】
: i want to find a way to monitor the heap usage
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。