зеркало из https://github.com/mozilla/pjs.git
Bug 685429 - Avoid wasted space in JSFunctionBoxQueue due to jemalloc rounding up. r=pbiggar.
--HG-- extra : rebase_source : 6344167b2b46f353fb88ae2839882c29247f606f
This commit is contained in:
Родитель
055052a65e
Коммит
c59e36ef0c
|
@ -1062,11 +1062,11 @@ struct JSFunctionBoxQueue {
|
|||
|
||||
bool init(uint32 count) {
|
||||
lengthMask = JS_BITMASK(JS_CeilingLog2(count));
|
||||
vector = js::OffTheBooks::array_new<JSFunctionBox*>(length());
|
||||
vector = (JSFunctionBox **) js::OffTheBooks::malloc_(sizeof(JSFunctionBox) * length());
|
||||
return !!vector;
|
||||
}
|
||||
|
||||
~JSFunctionBoxQueue() { js::UnwantedForeground::array_delete(vector); }
|
||||
~JSFunctionBoxQueue() { js::UnwantedForeground::free_(vector); }
|
||||
|
||||
void push(JSFunctionBox *funbox) {
|
||||
if (!funbox->queued) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче