mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +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 |
||
---|---|---|
.. | ||
base | ||
build | ||
components | ||
doc | ||
ds | ||
glue | ||
idl-parser | ||
io | ||
libxpt/xptcall | ||
reflect | ||
rust | ||
string | ||
system | ||
tests | ||
threads | ||
typelib | ||
windbgdlg | ||
xpidl | ||
moz.build | ||
xpcom-config.h.in | ||
xpcom-private.h.in |