• 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

memory question?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if java get memory from OS, it don't return to OS until the programe end ?
How to down totalmemory of java ?
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Zhao Xin,
There are some methods in class Runtime about this.
Susilo
 
zhao xin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
my question is down java totalmemory(no freememory)?
In my program ,i use manay memory . the java totalmemory raise very big .When i use System.gc(),the java freememory is down,but java totalmemory is not down.The OS memory is old OS memory add java totalmemory .
How to down java totalmemory? This can down OS memory.
Thanks
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Zhao,
When the JVM is launched, the host operating system allocates an amount of memory to it. I understand that you want to change this amount of memory, from within the JVM, while it is running.
If this is the case, I don't think it can be done in pure java. You would most probably have to do this via JNI and the host operating system services.
While researching a similar topic, I found that your question has been asked several times already in the various java forums and newsgroups, but I failed to find an adequate response. Therefore, there's not much more I can offer you, sorry :-(
Hope this has helped you, anyway.
Good Luck,
Avi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic