0

I have the following details of a Java process (WildFly application server):

 "heap-memory-usage" => {
            "init" => 536870912L,
            "used" => 73683328L,
            "committed" => 505413632L,
            "max" => 1908932608L
        }

I need to create an alert when the amount of free memory drops under a certain level. Is it correct to assume that the heap available memory equals to (max - used) ? or should I use (max - committed) ?
Thanks

2

1 Answer 1

1

You should use max - used. See java.lang.management.MemoryUsage class API for details

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.