Skip to content

Allow using memInventory with nonmoving gc

memInventory is helpful for diagnosing fragmentation, but it's currently disabled when the nonmoving gc is enabled as explained by this comment:

  // Can't easily do a memory inventory: We might race with the nonmoving
  // collector. In principle we could try to take nonmoving_collection_mutex
  // and do an inventory if we have it but we don't currently implement this.

It also suggests a solution -- only taking an inventory if we can grab the nonmoving_collection_mutex.

I'll try to implement this suggestion.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information