|
| |
User Groups : Forums : SiteExperts : The Server
:  | managing memory in Java
Which one of the following has a very large responsibility for managing memory in Java?
1) Garbage Collector 2) Malloc Statements 3) Constructors 4) JMem 5) JKernel
Looking forward for an early reply.
Thanks
Started By pashah72 on Jul 2, 2008 at 4:54:22 AM |  | | 8 Response(s) | Reply |
| View All Replies | Goto Page: 2 1 |  | | ChrisRickard on Jul 11, 2008 at 12:33:59 AM Well you can throw out 4 and 5. They are just made up Java-ish Memory-ish sounding names not really having to do with memory.
As to 1-3
Responsible for allocating memory upon object construction and freeing memory once objects are no longer referenced.
Java doesn't have explicit memory functions like malloc. Even at a lower level the JVM itself doesn't call a c malloc statement, but there is a mechanism where it asks the OS for a reserved chunk o' memory.
Constructors play a role in allocating memory at a higher conceptual level in that child objects are often initialized there, but I don't think it's what the question is looking for.
Here's a great whitepaper describing Java's Memory Management.
| | View All Replies | Goto Page: 2 1 |
To respond to a discussion, you must first logon.
If you are not registered, please register yourself to become a member of the SiteExperts.community.
|