Solved

Java alerts bloating memory

Posted on 2012-03-22
2
304 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
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 500 total points
ID: 37754241
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now