• Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I get system RAM  RSS feed

 
Michael Bunch
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • 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.
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Native meaning create a DLL in C++ and call it from Java?
 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may code c between a native block. Calling a dll is not necessary.
 
Petr Blahos
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!