Lines Matching refs:szAtom
17865 ** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
17866 ** mem5.szAtom is always at least 8 and 32-bit integers are used,
17887 int szAtom; /* Smallest possible allocation in bytes */
17888 int nBlock; /* Number of szAtom sized blocks in zPool */
17910 ** size mem5.szAtom. aiFreelist[1] holds blocks of size szAtom*2.
17932 #define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))
17996 int i = (int)(((u8 *)p-mem5.zPool)/mem5.szAtom);
17998 iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));
18036 for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
18072 memset(&mem5.zPool[i*mem5.szAtom], 0xAA, iFullSz);
18076 return (void*)&mem5.zPool[i*mem5.szAtom];
18087 ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.
18089 iBlock = (int)(((u8 *)pOld-mem5.zPool)/mem5.szAtom);
18093 assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );
18103 assert( mem5.currentOut>=(size*mem5.szAtom) );
18105 mem5.currentOut -= size*mem5.szAtom;
18136 memset(&mem5.zPool[iBlock*mem5.szAtom], 0x55, size);
18215 for(iFullSz=mem5.szAtom; iFullSz<n; iFullSz *= 2);
18264 mem5.szAtom = (1<<nMinLog);
18265 while( (int)sizeof(Mem5Link)>mem5.szAtom ){
18266 mem5.szAtom = mem5.szAtom << 1;
18269 mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
18271 mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];
18326 nMinLog = memsys5Log(mem5.szAtom);
18329 fprintf(out, "freelist items of size %d: %d\n", mem5.szAtom << i, n);