• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How can I get system RAM

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

How can I get the amount of RAM on the system that my app if running from? I don't want to amount allocated to the Runtime. I want to total RAM of the system, such a 1GB of RAM. Does anyone know how I could get that from within my app? Thanks alot.
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is very O/S specific. There is a different way of doing in Unix vs. Windows and there are even differences between different Unix distributions. If you just have to do it in Java then you'll need to go native.
 
Michael Bunch
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Native meaning create a DLL in C++ and call it from Java?
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may code c between a native block. Calling a dll is not necessary.
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Murat Balkan:
You may code c between a native block. Calling a dll is not necessary.



Can you elaborate on this?!?

Thanks,
Petr
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic