Can't see memory usage with applications 'M' report

Is anyone else having this problem, or used to have but solved it?

This is what i always get when pressing ‘M’ in apps and getting the memory usage report:

Existing buffers: 0

(b: 0 f: 0 i: 0 s: 0 d: 0)

Total heap memory held: 20185kb

Total direct memory held: 0kb

(b: 0kb f: 0kb i: 0kb s: 0kb d: 0kb)

The heap stuff seems to be correct. The Existing buffers are always 0 tho, but that makes no sense, because there are terrains, skybox and geometry in the scene. Also, from visual VM i get this:


Count: 596

Memory used: 31669938

Name: direct

Object name: java:nio:type = BufferPool, name = direct

I have not fiddled around with any settings, it’s just a plain SimpleApplication without modifications.

Is someone else having this problem?

I’m reasonably sure that the direct memory report from “M” is only using JME’s BufferUtils since the JVM provides no way to examine direct memory.

This is problematic for two reasons. 1) it would only show direct memory allocated through BufferUtils. 2) BufferUtils has memory tracking turned off because it was implemented incorrectly and it was easier for me to turn it off than to fix the original version. The tracking code needs a total rewrite before BufferUtils can properly track direct memory that it allocated. (And note again this wouldn’t include anything allocated outside of BufferUtils like by your own app or JVM code, etc.)