• 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

Difference between Heap memory size and RAM

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between RAM and Heap memory size?How the heap memory size relates to System RAM?
Thanks
Lara
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lara Martin:
What is the difference between RAM and Heap memory size?How the heap memory size relates to System RAM?
Thanks
Lara


The RAM is the physical memory of your computer. Heap memory is the (logical) memory reserved for the heap.
So, only part of the RAM is used as heap memory and heap memory doesn't have to be fully loaded into RAM (e.g. part of it may be swapped to disc by the OS).
Does that help? Why do you want to know?
 
Lara Martin
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks...
What is swapped to OS?
I use WebLogic server 6.1 and some heap memory size in startWebLogic.sh file.Just want to know the differences.
Lara
 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a question of OS paging, aka virtual memory. You computer can take some of the data in RAM and write it to disk, temporarily. (This is, of course, the data the OS has determined will be least needed in the near future.) The data paged out could be your application data, or even parts of the application itself, or simply other applications in their data, which are running in the backgroun.
--Mark
 
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Herschberg:
(This is, of course, the data the OS has determined will be least needed in the near future.)


Mark, is it sure that OS will replace the data which will least needed in the near future?.
As far as i know it depends upon the OS that which paging algorithm it is using.It may be,
1:Least Recent Used
2:Least Frequently Used
3 ptimal Page Replacement
Bye,
Viki.
[ June 07, 2002: Message edited by: Vikrama Sanjeeva ]
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Certainly the OS cannot know what will really be needed in the future - it can only guess. When Mark says "the data the OS has determined will be least needed in the near future", he means "the data the OS thinks will be least needed in the near future". No big deal.
 
Vikrama Sanjeeva
Ranch Hand
Posts: 782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jim Yingst:
Certainly the OS cannot know what will really be needed in the future - it can only guess.


My point is not that, what OS will guess about which data should be placed temporarily to disk.
As Mark in his last post said,


It's a question of OS paging, aka virtual memory. You computer can take some of the data in RAM and write it to disk, temporarily. (This is, of course, the data the OS has determined will be least needed in the near future.)


In the BOLD lines above in his quote,He sures that OS will be using Least Frequently Used
Algorithm.Well as far as i know it depends which data OS will place temporarily in disk.It may place,
1: The data which is used just recently.
2: The data which will be not used frequently(in future)
3: The data which is used heavily.
Bye,
Viki.
 
Mark Herschberg
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My statement does not imply that LFU is used by the OS. There are hundreds of caching and paging algorithms that have been developed.
Here's an example let's say that some system data is used once every 5 seconds. In the last 4 second some application data was produced and used, but the way the program works, the application data will not be needed for a while longer, e.g. 30 seconds. The system data, used every 5 seconds, was used less recently then the other data, but a sophisticated paging alogirthm will know not to page it out.
--Mark
 
You showed up just in time for the waffles! And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic