Skip to content

Instantly share code, notes, and snippets.

@Morfly
Last active November 7, 2022 07:39
Show Gist options
  • Save Morfly/427d88b2a1bc11abb87a65941fd4e8aa to your computer and use it in GitHub Desktop.
Save Morfly/427d88b2a1bc11abb87a65941fd4e8aa to your computer and use it in GitHub Desktop.
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