Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java alerts bloating memory

Posted on 2012-03-22
2
Medium Priority
?
327 Views
Last Modified: 2012-08-13
Anybody has a way of setting a trigger for JAVA alerts on bloating the memory ?
0
Comment
Question by:leew781
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 37753815
You can determine the memory in Java in this way:
see this link
http://www.codebeach.com/2008/02/determine-available-memory-in-java.html

long maxMemory = runtime.maxMemory();  
long allocatedMemory = runtime.totalMemory();  
long freeMemory = runtime.freeMemory();  

So you can probably set up alerts by checking the free memory, if that is what you mean
0
 
LVL 7

Accepted Solution

by:
gudii9 earned 1500 total points
ID: 37754241
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question