Lines Matching defs:szAtom
27054 ** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
27055 ** mem5.szAtom is always at least 8 and 32-bit integers are used,
27076 int szAtom; /* Smallest possible allocation in bytes */
27077 int nBlock; /* Number of szAtom sized blocks in zPool */
27101 ** size mem5.szAtom. aiFreelist[1] holds blocks of size szAtom*2.
27102 ** aiFreelist[2] holds free blocks of size szAtom*4. And so forth.
27123 #define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))
27184 i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom);
27186 iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));
27222 for(iFullSz=mem5.szAtom,iLogsize=0; iFullSz<nByte; iFullSz*=2,iLogsize++){}
27260 memset(&mem5.zPool[i*mem5.szAtom], 0xAA, iFullSz);
27264 return (void*)&mem5.zPool[i*mem5.szAtom];
27275 ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.
27277 iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom);
27281 assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );
27293 assert( mem5.currentOut>=(size*mem5.szAtom) );
27295 mem5.currentOut -= size*mem5.szAtom;
27327 memset(&mem5.zPool[iBlock*mem5.szAtom], 0x55, size);
27403 if( n<=mem5.szAtom*2 ){
27404 if( n<=mem5.szAtom ) return mem5.szAtom;
27405 return mem5.szAtom*2;
27412 for(iFullSz=mem5.szAtom*8; iFullSz<n; iFullSz *= 4);
27462 mem5.szAtom = (1<<nMinLog);
27463 while( (int)sizeof(Mem5Link)>mem5.szAtom ){
27464 mem5.szAtom = mem5.szAtom << 1;
27467 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
27469 mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];
27524 nMinLog = memsys5Log(mem5.szAtom);
27527 fprintf(out, "freelist items of size %d: %d\n", mem5.szAtom << i, n);