mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
225f3a87e4
This patch reduces sizeof(PLDHashTable) as follows. - 64-bit: from 40 bytes to 32 - 32-bit: from 28 bytes to 20 It does this by doing the following. - It moves mGeneration from EntryStore to PLDHashTable, to avoid unnecessary padding on 64-bit. This requires tweaking EntryStore::Set() as explained in a comment. - It also shrinks mGeneration from uint32_t to uint16_t, saving 2 bytes of data. - It shrinks mEntrySize from uint32_t to uint8_t, to cut 3 bytes of data. - It shrinks mHashShift from int16_t to uint8_t, trimming another byte of data, and moves it, saving another 2 bytes of padding. And it reorders the fields so the word-sized ones are at the start, which makes it easier to imagine the memory layout. The patch also adds a test, and fixes some misordered function arguments in existing tests. --HG-- extra : rebase_source : 6ed6f7be68477fd4a82f07dd2f51c1f1d9b92dcc |
||
---|---|---|
.. | ||
gtest | ||
unit | ||
windows | ||
Makefile.in | ||
moz.build | ||
NotXPCOMTest.idl | ||
RegFactory.cpp | ||
resources.h | ||
SizeTest01.cpp | ||
SizeTest02.cpp | ||
SizeTest03.cpp | ||
SizeTest04.cpp | ||
SizeTest05.cpp | ||
SizeTest06.cpp | ||
test.properties | ||
TestArguments.cpp | ||
TestBlockingProcess.cpp | ||
TestHarness.h | ||
TestingAtomList.h | ||
TestPRIntN.cpp | ||
TestQuickReturn.cpp | ||
TestShutdown.cpp | ||
TestStackCrawl.cpp | ||
TestStreamUtils.cpp | ||
TestUnicodeArguments.cpp | ||
TestWinReg.js |