Hello everyone,
Someone I know asked me about a problem he has with a program he is writing. I know nothing about his code, but he is writing a keyboard program, with the midi synthesizer in the sound api. what I do know is that he is using note on when a key is depressed, and note off when it is released.
I don't know what made him do it, but he decided to watch task manager as he tested this program (in eclipse if it matters), and the more keys he pressed the higher the memory usage of the program went, and didn't decrease.
I have no explanation for him, I recommended that he register here and ask for himself, but as he hasn't done it, I suspect he won't.

Does anyone know something I can tell him?

Recommended Answers

All 2 Replies

Does he ever get a Heap Space exception? Does he ever even fill at least have of the Heap Space? If not, it may just be that the JVM hasn't felt that a GC run has been necessary yet. Also, even if it has, Java only reserves from the system the min heap space, then, as that is surpassed will periodically reserve more until the Maximum Heap Space has been reached. But the JVM never releases that memory back to the System. So, even though the memory usage of the JVM seems to go up and up and up, from the System view, that doesn't mean there is any kind of memory problem. Find a profiler and monitor the actual Heap Space, not the system memory usage of the JVM.

thanks for the info, I'll relay that to him.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.