Hello Guest

[SOLVED]How can I know how much memory am I using when using BufferUtils?

  • 2 Replies
  • 279 Views
I'm developing a game and I planned to do some garbage collection when I am holding some size of memories with org.lwjgl.BufferUtils in total,like, 4G or so, then I can just find some latest unused textures and delete them.
So, I will be super happy if there be some way to get the total size of holding buffers which is allocated by org.lwjgl.BufferUtils. Or should I track it myself?
 ;)
« Last Edit: December 29, 2018, 14:05:22 by XenoAmess »

*

Offline spasi

  • *****
  • 2123
    • WebHotelier
There's MemoryUtil.memReport but it has limitations: it only tracks allocations via MemoryUtil and Configuration.DEBUG_MEMORY_ALLOCATOR must be enabled. There's overhead, so it's not enabled by default. A custom solution would be better if you need memory tracking in release builds.

;) I will do it manually then.
Thanks for your help.