memory usage in java

B

Bala

Java doesn't access memory from the local libraries, where as C and
C++ do that. why is that?
 
J

Joseph Millar

Java doesn't access memory from the local libraries, where as C and
C++ do that. why is that?

Not sure what you mean by memory from local libraries. If
you mean malloc() and such, in fact it does, but most of
the large memory allocations of the JVM are done using
some form of OS memory allocation routine, which is all
malloc() and its brethren use. The exact routines called
depend on OS and JVM implementation.

The JVM usually makes an initial large memory allocation,
called the Java heap. Code in Java that allocates objects
will have these objects created in the heap and managed by
the JVM. The heap is grown at need up to set limits (see
the -Xms and -Xmx startup parameters for more info on
controlling the size of the Java heap).

--Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top