MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / AllocUnits

Method AllocUnits

Libraries/unrar/suballoc.cpp:233–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231
232
233inline void* SubAllocator::AllocUnits(int NU)
234{
235 int indx=Units2Indx[NU-1];
236 if ( FreeList[indx].next )
237 return RemoveNode(indx);
238 void* RetVal=LoUnit;
239 LoUnit += U2B(Indx2Units[indx]);
240 if (LoUnit <= HiUnit)
241 return RetVal;
242 LoUnit -= U2B(Indx2Units[indx]);
243 return AllocUnitsRare(indx);
244}
245
246
247void* SubAllocator::AllocContext()

Callers 2

RestartModelRareMethod · 0.80
UpdateModelMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected