Lines Matching refs:pBuf

6903   void *pBuf;        /* The content of the page */
6996 ** The pBuf element of the returned sqlite3_pcache_page object will be a
15164 SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
15166 return id->pMethods->xRead(id, pBuf, amt, offset);
15168 SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
15170 return id->pMethods->xWrite(id, pBuf, amt, offset);
16122 static void randomFill(char *pBuf, int nByte){
16124 x = SQLITE_PTR_TO_INT(pBuf);
16130 *(int*)pBuf = r;
16131 pBuf += 4;
16138 *(pBuf++) = r & 0xff;
19258 LookasideSlot *pBuf = (LookasideSlot*)p;
19263 pBuf->pNext = db->lookaside.pFree;
19264 db->lookaside.pFree = pBuf;
19386 LookasideSlot *pBuf;
19393 }else if( (pBuf = db->lookaside.pFree)==0 ){
19396 db->lookaside.pFree = pBuf->pNext;
19402 return (void*)pBuf;
20630 SQLITE_API void sqlite3_randomness(int N, void *pBuf){
20631 unsigned char *zBuf = pBuf;
26175 ** bytes into pBuf. Return the number of bytes actually read.
26186 static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
26197 got = osPread(id->h, pBuf, cnt, offset);
26200 got = osPread64(id->h, pBuf, cnt, offset);
26213 got = osRead(id->h, pBuf, cnt);
26225 pBuf = (void*)(got + (char*)pBuf);
26241 void *pBuf,
26265 memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
26269 memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
26270 pBuf = &((u8 *)pBuf)[nCopy];
26277 got = seekAndRead(pFile, offset, pBuf, amt);
26286 memset(&((char*)pBuf)[got], 0, amt-got);
26294 ** pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise,
26301 const void *pBuf, /* Copy data from this buffer to the file */
26302 int nBuf, /* Size of buffer pBuf in bytes */
26312 do{ rc = osPwrite(fd, pBuf, nBuf, iOff); }while( rc<0 && errno==EINTR );
26314 do{ rc = osPwrite64(fd, pBuf, nBuf, iOff);}while( rc<0 && errno==EINTR);
26324 rc = osWrite(fd, pBuf, nBuf);
26337 ** Seek to the offset in id->offset then read cnt bytes into pBuf.
26343 static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
26344 return seekAndWriteFd(id->h, offset, pBuf, cnt, &id->lastErrno);
26354 const void *pBuf,
26387 if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
26399 memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
26403 memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
26404 pBuf = &((u8 *)pBuf)[nCopy];
26411 while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
26414 pBuf = &((char*)pBuf)[wrote];
32864 void *pBuf, /* Write content into this buffer */
32880 pFile->h, pBuf, amt, offset, pFile->locktype));
32887 memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
32892 memcpy(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
32893 pBuf = &((u8 *)pBuf)[nCopy];
32905 while( !osReadFile(pFile->h, pBuf, amt, &nRead, 0) ){
32910 while( !osReadFile(pFile->h, pBuf, amt, &nRead, &overlapped) &&
32923 memset(&((char*)pBuf)[nRead], 0, amt-nRead);
32938 const void *pBuf, /* The bytes to be written */
32952 pFile->h, pBuf, amt, offset, pFile->locktype));
32959 memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
32964 memcpy(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
32965 pBuf = &((u8 *)pBuf)[nCopy];
32981 u8 *aRem = (u8 *)pBuf; /* Data yet to be written */
35863 ** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
35866 SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
35882 u32 *aiValues = pBuf;
36329 pPgHdr->pData = pPage->pBuf;
36337 assert( pPgHdr->pData==pPage->pBuf );
36819 ** verb to sqlite3_config(). Parameter pBuf points to an allocation large
36825 SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
36832 pcache1.pStart = pBuf;
36836 p = (PgFreeslot*)pBuf;
36839 pBuf = (void*)&((char*)pBuf)[sz];
36841 pcache1.pEnd = pBuf;
36964 p->page.pBuf = pPg;
36985 pcache1Free(p->page.pBuf);
37645 nFree += pcache1MemSize(p->page.pBuf);
53450 ** from pPayload to the buffer pointed at by pBuf. If eOp is true,
53452 ** of data are copied from the buffer pBuf to pPayload.
53458 void *pBuf, /* Pointer to buffer */
53469 memcpy(pPayload, pBuf, nByte);
53472 memcpy(pBuf, pPayload, nByte);
53481 ** buffer pBuf). If it is non-zero, a write (data copied from
53482 ** buffer pBuf).
53485 ** Data is read to or from the buffer pBuf.
53509 unsigned char *pBuf, /* Write the bytes into this buffer */
53541 rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
53543 pBuf += a;
53640 u8 *aWrite = &pBuf[-4];
53656 rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
53662 pBuf += a;
53675 ** "amt" bytes will be transfered into pBuf[]. The transfer
53685 SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
53690 return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
53695 ** "amt" bytes will be transfered into pBuf[]. The transfer
53702 SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
53717 rc = accessPayload(pCur, offset, amt, pBuf, 0);
61304 ** The pBuf parameter is the initial value of a pointer which will
61305 ** receive the new memory. pBuf is normally NULL. If pBuf is not
61307 ** this routine should not allocate any new memory. When pBuf is not
61308 ** NULL simply return pBuf. Only allocate new memory space when pBuf
61322 void *pBuf, /* Where return pointer will be stored */
61329 if( pBuf ) return pBuf;
61332 pBuf = (void*)*ppFrom;
61337 return pBuf;
115313 static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
115334 }else if( pBuf==0 ){
115340 pStart = pBuf;
115357 db->lookaside.bMalloced = pBuf==0 ?1:0;
115402 void *pBuf = va_arg(ap, void*); /* IMP: R-26835-10964 */
115405 rc = setupLookaside(db, pBuf, sz, cnt);