Lines Matching refs:aPool

16052 ** We often identify a chunk by its index in mem3.aPool[].  When
16075 u32 next; /* Index in mem3.aPool[] of next free chunk */
16076 u32 prev; /* Index in mem3.aPool[] of previous free chunk */
16090 ** (in Mem3Blocks) pointed to by aPool less 2.
16093 Mem3Block *aPool;
16131 ** Unlink the chunk at mem3.aPool[i] from list it is currently
16135 u32 next = mem3.aPool[i].u.list.next;
16136 u32 prev = mem3.aPool[i].u.list.prev;
16141 mem3.aPool[prev].u.list.next = next;
16144 mem3.aPool[next].u.list.prev = prev;
16146 mem3.aPool[i].u.list.next = 0;
16147 mem3.aPool[i].u.list.prev = 0;
16157 assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
16159 size = mem3.aPool[i-1].u.hdr.size4x/4;
16160 assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
16171 ** Link the chunk at mem3.aPool[i] so that is on the list rooted
16176 mem3.aPool[i].u.list.next = *pRoot;
16177 mem3.aPool[i].u.list.prev = 0;
16179 mem3.aPool[*pRoot].u.list.prev = i;
16192 assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
16193 size = mem3.aPool[i-1].u.hdr.size4x/4;
16194 assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
16243 assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );
16244 assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );
16245 x = mem3.aPool[i-1].u.hdr.size4x;
16246 mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2);
16247 mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock;
16248 mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2;
16249 return &mem3.aPool[i];
16272 mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock;
16273 mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x |= 2;
16274 mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1;
16276 mem3.aPool[newi-1].u.hdr.prevSize = mem3.szMaster;
16277 x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
16278 mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
16282 return (void*)&mem3.aPool[newi];
16307 iNext = mem3.aPool[i].u.list.next;
16308 size = mem3.aPool[i-1].u.hdr.size4x;
16312 assert( i > mem3.aPool[i-1].u.hdr.prevSize );
16313 prev = i - mem3.aPool[i-1].u.hdr.prevSize;
16315 iNext = mem3.aPool[prev].u.list.next;
16319 x = mem3.aPool[prev-1].u.hdr.size4x & 2;
16320 mem3.aPool[prev-1].u.hdr.size4x = size*4 | x;
16321 mem3.aPool[prev+size-1].u.hdr.prevSize = size;
16368 for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){
16369 if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){
16428 assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );
16429 i = p - mem3.aPool;
16430 assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );
16431 size = mem3.aPool[i-1].u.hdr.size4x/4;
16433 mem3.aPool[i-1].u.hdr.size4x &= ~1;
16434 mem3.aPool[i+size-1].u.hdr.prevSize = size;
16435 mem3.aPool[i+size-1].u.hdr.size4x &= ~2;
16440 while( (mem3.aPool[mem3.iMaster-1].u.hdr.size4x&2)==0 ){
16441 size = mem3.aPool[mem3.iMaster-1].u.hdr.prevSize;
16445 x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
16446 mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
16447 mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
16449 x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
16450 while( (mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x&1)==0 ){
16452 mem3.szMaster += mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x/4;
16453 mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
16454 mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
16547 mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap;
16554 mem3.aPool[0].u.hdr.size4x = (mem3.szMaster<<2) + 2;
16555 mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool;
16556 mem3.aPool[mem3.nPool].u.hdr.size4x = 1;
16594 size = mem3.aPool[i-1].u.hdr.size4x;
16596 fprintf(out, "%p size error\n", &mem3.aPool[i]);
16600 if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){
16601 fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]);
16605 if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){
16606 fprintf(out, "%p tail checkout bit is incorrect\n", &mem3.aPool[i]);
16611 fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8);
16613 fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8,
16620 for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){
16621 fprintf(out, " %p(%d)", &mem3.aPool[j],
16622 (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
16629 for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){
16630 fprintf(out, " %p(%d)", &mem3.aPool[j],
16631 (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
16820 ** Unlink the chunk at mem5.aPool[i] from list it is currently
16842 ** Link the chunk at mem5.aPool[i] so that is on the iLogsize
16918 int i; /* Index of a mem5.aPool[] slot */