• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is heap virtual?

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
newbie in java

what i understood about the runtime of java class is

when i run my prog
java xxx

1. The JVM is loaded into RAM?
2. The classXXX and its dependent classes are loaded by JVM into the RAM ?
3. The objects created by class reside in <b>Heap</b>

where is this Heap actually, is it a virtual memory in RAM created by JVM? or is this physical?

please clarify me..thank you
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to Bruce Eckel's Thinking in Java, the heap is in RAM.

See the topic, "Where storage lives" in Chapter 2 (reference below). This briefly describes registers, the stack, the heap, static storage, constant storage, and non-RAM storage.

Ref: http://www.faqs.org/docs/think_java/TIJ304.htm
[ December 02, 2004: Message edited by: marc weber ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
kumred,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

We request that display names follow the pattern FIRST_NAME + SPACE + LAST_NAME.

Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where is this Heap actually, is it a virtual memory in RAM created by JVM? or is this physical?

When the JVM is started, it's loaded by an operating system into system memory (RAM). The operating system manages the system memory, including determing whether to put the memory where the JVM is executing in physical memory or in virtual memory. The JVM doesn't manage this.

Any decent book on operating system concepts should cover memory management in more detail.

The "Heap" memory used by the JVM is part of the total memory the operating system allocates to the JVM. The JVM does manage what data is in the "Heap", but it has no control over whether this section of "Heap" memory is in physical memory or in virtual memory.
 
kumm redd
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
thank you for ur replies..

few books say that java heap is created by JVM(i.e, after jvm is loaded, heap memory is allocated my jvm ), and few say that heap is a part of memory in RAM allocated to JVM by OS.

and dirk, changed my display name..

thank you
 
Would anybody like some fudge? I made it an hour ago. And it goes well with a tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic