libraries/v8/runtime.cc
// Gets the current heap usage.
Gets the current heap usage.
Gets the current heap usage .
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetHeapUsage) {
  SealHandleScope shs(isolate);
  int usage = static_cast<int>(isolate->heap()->SizeOfObjects());
  if (!Smi::IsValid(usage)) {
    return *isolate->factory()->NewNumberFromInt(usage);
  }
  return Smi::FromInt(usage);
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_GetHeapUsage ) { SealHandleScope shs ( isolate ) ; int usage = static_cast < int > ( isolate -> heap ( ) -> SizeOfObjects ( ) ) ; if ( ! Smi :: IsValid ( usage ) ) { return * isolate -> factory ( ) -> NewNumberFromInt ( usage ) ; } return Smi :: FromInt ( usage ) ; }
Gets the current heap usage.
Gets the current heap usage .