Skip to content

Instantly share code, notes, and snippets.

Last active November 7, 2022 07:39
What would you like to do?
val totalMemoryKb = Runtime.getRuntime().totalMemory() / 1024
val freeMemoryKb = Runtime.getRuntime().freeMemory() / 1024
val jvmHeapAllocatedKb = totalMemoryKb - freeMemoryKb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment