Allocate HphpArrays in a flat mode instead of using m_inline_data

Gets HphpArrays into a flat mode using MM().objMalloc()
instead of SmartAllocator.  Various optimizations were needed to the
Make functions to get this to work out ok.  Growth still creates a
non-flat HphpArray (leaving a PromotedPayload behind so we know how
big the original allocation was).

Reviewed By: @edwinsmith

Differential Revision: D969431
Esse commit está contido em:
Jordan DeLong
2013-09-08 19:30:13 -07:00
commit de Sara Golemon
commit 38fd595342
32 arquivos alterados com 589 adições e 354 exclusões
+4 -2
Ver Arquivo
@@ -30,13 +30,15 @@ ArrayInit::ArrayInit(ssize_t n) {
// Force compilation of PolicyArray
m_data = NEW(PolicyArray)(n);
} else {
m_data = ArrayData::Make(n);
m_data = HphpArray::MakeReserve(n);
m_data->setRefCount(0);
}
}
HOT_FUNC
ArrayInit::ArrayInit(ssize_t n, MapInit)
: m_data(ArrayData::Make(n)) {
: m_data(HphpArray::MakeReserve(n)) {
m_data->setRefCount(0);
}
///////////////////////////////////////////////////////////////////////////////