Definition at line 434 of file allocators.cpp. Referenced by _M_allocate(). {
int __nobjs = 20;
char* __chunk = _S_chunk_alloc(__n, __nobjs);
if (1 == __nobjs) return __REINTERPRET_CAST(_Obj*, __chunk);
_Obj* _STLP_VOLATILE* __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
_Obj* __result;
_Obj* __current_obj;
_Obj* __next_obj;
/* Build free list in chunk */
__result = __REINTERPRET_CAST(_Obj*, __chunk);
*__my_free_list = __next_obj = __REINTERPRET_CAST(_Obj*, __chunk + __n);
for (--__nobjs; --__nobjs; ) {
__current_obj = __next_obj;
__next_obj = __REINTERPRET_CAST(_Obj*, __REINTERPRET_CAST(char*, __next_obj) + __n);
__current_obj->_M_next = __next_obj;
}
__next_obj->_M_next = 0;
return __result;
}
|