-
Junior Member
Memory size occupied by object
Is it possible to find the memory occupied by a object or variable in java? give me proper solution
-
Banned
Re: Memory size occupied by object
Hi ravi,
You can use Runtime . freeMemory() for calculating object size.
First use this function to find the total free memory before object is created.
Create the object and again test the free memory using the fucntion. this will approximately return the memory size occupied by an object.
Thanks & Regards,
suresh
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules