You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/09/28 15:14:32 UTC

[GitHub] [skywalking] x22x22 commented on issue #3544: why maxNonHeap result is minus?

x22x22 commented on issue #3544: why maxNonHeap result is minus?
URL: https://github.com/apache/skywalking/issues/3544#issuecomment-536198170
 
 
   I see agent core souse(org.apache.skywalking.apm.agent.core.jvm.memory.MemoryProvider), use MemoryMXBean.getNonHeapMemoryUsage.getMax get maxNonHeap value. 
   
   see jdk document: https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryUsage.html
   
   > getMax
   > public long getMax()
   > Returns the maximum amount of memory in bytes that can be used for memory management. This method returns -1 if the maximum memory size is undefined.
   > This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The Java virtual machine may fail to allocate memory even if the amount of used memory does not exceed this maximum size.
   > 
   > Returns:
   > the maximum amount of memory in bytes; -1 if undefined.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services