Results 1 to 2 of 2

Thread: Memory size occupied by object

  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    5

    Memory size occupied by object

    Is it possible to find the memory occupied by a object or variable in java? give me proper solution


  2. #2
    Banned
    Join Date
    Jan 2008
    Answers
    25

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact