Esempio n. 1
0
CollisionWorkingList* CollisionWorkingList::alloc()
{
   if (sFreeList.wLink.mNext != &sFreeList) {
      CollisionWorkingList* nxt = sFreeList.wLink.mNext;
      nxt->unlink();
      return nxt;
   }
   return constructInPlace((CollisionWorkingList*)sChunker.alloc(sizeof(CollisionWorkingList)));
}
Esempio n. 2
0
CollisionStateList* CollisionStateList::alloc()
{
   if (!sFreeList.isEmpty()) {
      CollisionStateList* nxt = sFreeList.mNext;
      nxt->unlink();
      nxt->mState = NULL;
      return nxt;
   }
   return constructInPlace((CollisionStateList*)sChunker.alloc(sizeof(CollisionStateList)));
}
Esempio n. 3
0
void NetStringTable::repack()
{
   DataChunker *newAllocator = new DataChunker(DataChunkerSize);
   for(U32 walk = firstValid; walk; walk = table[walk].link)
   {
      const char *prevStr = table[walk].string;


      table[walk].string = (char *) newAllocator->alloc(dStrlen(prevStr) + 1);
      dStrcpy(table[walk].string, prevStr);
   }
   delete allocator;
   allocator = newAllocator;
}
Esempio n. 4
0
 void *consoleAlloc(U32 size) { return gConsoleAllocator.alloc(size);  }