Skip to content

Instantly share code, notes, and snippets.

@okabe-yuya
Last active August 18, 2021 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okabe-yuya/c0d4fac6855181d20d8b84d6f9fc6c39 to your computer and use it in GitHub Desktop.
Save okabe-yuya/c0d4fac6855181d20d8b84d6f9fc6c39 to your computer and use it in GitHub Desktop.
メモリ断片化の割合の算出式
def calculate
100 - (GC.stat[:heap_live_slots] / (GC.stat[:heap_eden_pages] * GC::INTERNAL_CONSTANTS[:HEAP_PAGE_OBJ_LIMIT] ))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment