mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1511251 - Remove redundant and costly assert. r=njn
The diagnostic assert (so fortunately, it doesn't impact release builds) as added in bug 1405159, but is costly because it uses the modulus of the division with a variable integer, which is a slow operation. However, in arena_run_reg_dalloc, we end up doing the same diagnostic assert, in a different form: after performing the division in a faster manner, we assert that the result, multiplied by the diviser, returns the original number. Differential Revision: https://phabricator.services.mozilla.com/D13501 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
27230a9848
commit
a8d4234310
@ -3228,10 +3228,6 @@ void arena_t::DallocSmall(arena_chunk_t* aChunk, void* aPtr,
|
||||
size = bin->mSizeClass;
|
||||
MOZ_DIAGNOSTIC_ASSERT(uintptr_t(aPtr) >=
|
||||
uintptr_t(run) + bin->mRunFirstRegionOffset);
|
||||
MOZ_DIAGNOSTIC_ASSERT(
|
||||
(uintptr_t(aPtr) - (uintptr_t(run) + bin->mRunFirstRegionOffset)) %
|
||||
size ==
|
||||
0);
|
||||
|
||||
memset(aPtr, kAllocPoison, size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user