Bug 1395509 - Remove existing malloc accounting for externally allocated memory r=sfink?

Since we now have precise memory accounting for externally allocated memory associated with GC things we should be able to remove use of the existing malloc counter here.  This should help with cases where we trigger too many GCs because we think there is more memory associated than there really is.

Differential Revision: https://phabricator.services.mozilla.com/D31806

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jon Coppeard 2019-05-20 17:27:02 +00:00
parent 6c9f60f8cc
commit ea2ed53caf

View File

@ -1161,7 +1161,6 @@ JS_PUBLIC_API void JS::AddAssociatedMemory(JSObject* obj, size_t nbytes,
}
Zone* zone = obj->zone();
zone->updateMallocCounter(nbytes);
zone->addCellMemory(obj, nbytes, js::MemoryUse(use));
zone->runtimeFromMainThread()->gc.maybeAllocTriggerZoneGC(zone);
}