Lines Matching refs:nBlock

15751 static void *memsys3Checkout(u32 i, u32 nBlock){
15755 assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );
15756 assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );
15758 mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2);
15759 mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock;
15760 mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2;
15769 static void *memsys3FromMaster(u32 nBlock){
15771 assert( mem3.szMaster>=nBlock );
15772 if( nBlock>=mem3.szMaster-1 ){
15782 newi = mem3.iMaster + mem3.szMaster - nBlock;
15784 mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock;
15786 mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1;
15787 mem3.szMaster -= nBlock;
15855 u32 nBlock;
15861 nBlock = 2;
15863 nBlock = (nByte + 11)/8;
15865 assert( nBlock>=2 );
15872 if( nBlock <= MX_SMALL ){
15873 i = mem3.aiSmall[nBlock-2];
15875 memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]);
15876 return memsys3Checkout(i, nBlock);
15879 int hash = nBlock % N_HASH;
15881 if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){
15883 return memsys3Checkout(i, nBlock);
15892 if( mem3.szMaster>=nBlock ){
15893 return memsys3FromMaster(nBlock);
15904 for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){
15919 if( mem3.szMaster>=nBlock ){
15920 return memsys3FromMaster(nBlock);
16285 int nBlock; /* Number of szAtom sized blocks in zPool */
16337 assert( i>=0 && i<mem5.nBlock );
16360 assert( i>=0 && i<mem5.nBlock );
16367 assert( x<mem5.nBlock );
16394 assert( i>=0 && i<mem5.nBlock );
16501 assert( iBlock>=0 && iBlock<mem5.nBlock );
16507 assert( iBlock+size-1<(u32)mem5.nBlock );
16527 if( (iBuddy+(1<<iLogsize))>mem5.nBlock ) break;
16671 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
16673 mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];
16682 if( (iOffset+nAlloc)<=mem5.nBlock ){
16687 assert((iOffset+nAlloc)>mem5.nBlock);