Lines Matching refs:sqlite3GlobalConfig
8607 #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) macro
8613 #define sqlite3GlobalConfig sqlite3Config macro
14235 nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * ( in sqlite3_db_status()
14771 if( sqlite3GlobalConfig.bLocaltimeFault ) pX = 0; in osLocaltime()
14778 if( sqlite3GlobalConfig.bLocaltimeFault ) return 1; in osLocaltime()
16137 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3MemMalloc()
16150 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3MemMalloc()
16206 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3MemRealloc()
16222 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3MemRealloc()
16495 if( !sqlite3GlobalConfig.bMemstat ){ in sqlite3MemInit()
16609 assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0 in sqlite3MemFree()
16686 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ in sqlite3MemdebugSetType()
16705 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ in sqlite3MemdebugHasType()
16727 if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){ in sqlite3MemdebugNoType()
17057 if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){ in memsys3Enter()
17388 if( !sqlite3GlobalConfig.pHeap ){ in memsys3Init()
17394 mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap; in memsys3Init()
17395 mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2; in memsys3Init()
17776 testcase( sqlite3GlobalConfig.xLog!=0 ); in memsys5MallocUnsafe()
17977 nByte = sqlite3GlobalConfig.nHeap; in memsys5Init()
17978 zByte = (u8*)sqlite3GlobalConfig.pHeap; in memsys5Init()
17982 nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq); in memsys5Init()
18008 if( sqlite3GlobalConfig.bMemstat==0 ){ in memsys5Init()
18122 if( !sqlite3GlobalConfig.mutex.xMutexAlloc ){ in sqlite3MutexInit()
18129 sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex; in sqlite3MutexInit()
18131 if( sqlite3GlobalConfig.bCoreMutex ){ in sqlite3MutexInit()
18141 rc = sqlite3GlobalConfig.mutex.xMutexInit(); in sqlite3MutexInit()
18156 if( sqlite3GlobalConfig.mutex.xMutexEnd ){ in sqlite3MutexEnd()
18157 rc = sqlite3GlobalConfig.mutex.xMutexEnd(); in sqlite3MutexEnd()
18174 return sqlite3GlobalConfig.mutex.xMutexAlloc(id); in sqlite3_mutex_alloc()
18178 if( !sqlite3GlobalConfig.bCoreMutex ){ in sqlite3MutexAlloc()
18182 return sqlite3GlobalConfig.mutex.xMutexAlloc(id); in sqlite3MutexAlloc()
18190 sqlite3GlobalConfig.mutex.xMutexFree(p); in sqlite3_mutex_free()
18200 sqlite3GlobalConfig.mutex.xMutexEnter(p); in sqlite3_mutex_enter()
18211 return sqlite3GlobalConfig.mutex.xMutexTry(p); in sqlite3_mutex_try()
18224 sqlite3GlobalConfig.mutex.xMutexLeave(p); in sqlite3_mutex_leave()
18234 return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p); in sqlite3_mutex_held()
18237 return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p); in sqlite3_mutex_notheld()
19306 if( sqlite3GlobalConfig.m.xMalloc==0 ){ in sqlite3MallocInit()
19310 if( sqlite3GlobalConfig.bCoreMutex ){ in sqlite3MallocInit()
19313 if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100 in sqlite3MallocInit()
19314 && sqlite3GlobalConfig.nScratch>0 ){ in sqlite3MallocInit()
19317 sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch); in sqlite3MallocInit()
19318 sqlite3GlobalConfig.szScratch = sz; in sqlite3MallocInit()
19319 pSlot = (ScratchFreeslot*)sqlite3GlobalConfig.pScratch; in sqlite3MallocInit()
19320 n = sqlite3GlobalConfig.nScratch; in sqlite3MallocInit()
19331 sqlite3GlobalConfig.pScratch = 0; in sqlite3MallocInit()
19332 sqlite3GlobalConfig.szScratch = 0; in sqlite3MallocInit()
19333 sqlite3GlobalConfig.nScratch = 0; in sqlite3MallocInit()
19335 if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512 in sqlite3MallocInit()
19336 || sqlite3GlobalConfig.nPage<1 ){ in sqlite3MallocInit()
19337 sqlite3GlobalConfig.pPage = 0; in sqlite3MallocInit()
19338 sqlite3GlobalConfig.szPage = 0; in sqlite3MallocInit()
19339 sqlite3GlobalConfig.nPage = 0; in sqlite3MallocInit()
19341 return sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData); in sqlite3MallocInit()
19357 if( sqlite3GlobalConfig.m.xShutdown ){ in sqlite3MallocEnd()
19358 sqlite3GlobalConfig.m.xShutdown(sqlite3GlobalConfig.m.pAppData); in sqlite3MallocEnd()
19414 nFull = sqlite3GlobalConfig.m.xRoundup(n); in mallocWithAlarm()
19425 p = sqlite3GlobalConfig.m.xMalloc(nFull); in mallocWithAlarm()
19429 p = sqlite3GlobalConfig.m.xMalloc(nFull); in mallocWithAlarm()
19456 }else if( sqlite3GlobalConfig.bMemstat ){ in sqlite3Malloc()
19461 p = sqlite3GlobalConfig.m.xMalloc(n); in sqlite3Malloc()
19503 if( mem0.nScratchFree && sqlite3GlobalConfig.szScratch>=n ){ in sqlite3ScratchMalloc()
19511 if( sqlite3GlobalConfig.bMemstat ){ in sqlite3ScratchMalloc()
19518 p = sqlite3GlobalConfig.m.xMalloc(n); in sqlite3ScratchMalloc()
19548 if( p>=sqlite3GlobalConfig.pScratch && p<mem0.pScratchEnd ){ in sqlite3ScratchFree()
19556 assert( mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch ); in sqlite3ScratchFree()
19564 if( sqlite3GlobalConfig.bMemstat ){ in sqlite3ScratchFree()
19570 sqlite3GlobalConfig.m.xFree(p); in sqlite3ScratchFree()
19573 sqlite3GlobalConfig.m.xFree(p); in sqlite3ScratchFree()
19597 return sqlite3GlobalConfig.m.xSize(p); in sqlite3MallocSize()
19608 return sqlite3GlobalConfig.m.xSize(p); in sqlite3DbMallocSize()
19619 if( sqlite3GlobalConfig.bMemstat ){ in sqlite3_free()
19623 sqlite3GlobalConfig.m.xFree(p); in sqlite3_free()
19626 sqlite3GlobalConfig.m.xFree(p); in sqlite3_free()
19682 nNew = sqlite3GlobalConfig.m.xRoundup(nBytes); in sqlite3Realloc()
19685 }else if( sqlite3GlobalConfig.bMemstat ){ in sqlite3Realloc()
19695 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew); in sqlite3Realloc()
19698 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew); in sqlite3Realloc()
19706 pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew); in sqlite3Realloc()
20933 sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode, in renderLogMsg()
20942 if( sqlite3GlobalConfig.xLog ){ in sqlite3_log()
22732 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3SafetyCheckOk()
22746 testcase( sqlite3GlobalConfig.xLog!=0 ); in sqlite3SafetyCheckSickOrOk()
27416 if( newLimit>sqlite3GlobalConfig.mxMmap ){
27417 newLimit = sqlite3GlobalConfig.mxMmap;
28799 pNew->mmapSizeMax = sqlite3GlobalConfig.szMmap;
32714 DWORD dwMaximumSize = (DWORD)sqlite3GlobalConfig.nHeap;
34434 if( newLimit>sqlite3GlobalConfig.mxMmap ){
34435 newLimit = sqlite3GlobalConfig.mxMmap;
35982 pFile->mmapSizeMax = sqlite3GlobalConfig.szMmap;
37258 sqlite3GlobalConfig.pcache2.xUnpin(pCache->pCache, p->pPage, 0);
37268 if( sqlite3GlobalConfig.pcache2.xInit==0 ){
37274 return sqlite3GlobalConfig.pcache2.xInit(sqlite3GlobalConfig.pcache2.pArg);
37277 if( sqlite3GlobalConfig.pcache2.xShutdown ){
37279 sqlite3GlobalConfig.pcache2.xShutdown(sqlite3GlobalConfig.pcache2.pArg);
37318 sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
37358 p = sqlite3GlobalConfig.pcache2.xCreate(
37364 sqlite3GlobalConfig.pcache2.xCachesize(p, numberOfCachePages(pCache));
37370 pPage = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, eCreate);
37396 sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache),
37405 pPage = sqlite3GlobalConfig.pcache2.xFetch(pCache->pCache, pgno, 2);
37481 sqlite3GlobalConfig.pcache2.xUnpin(pCache->pCache, p->pPage, 1);
37539 sqlite3GlobalConfig.pcache2.xRekey(pCache->pCache, p->pPage, p->pgno,newPgno);
37576 sqlite3GlobalConfig.pcache2.xTruncate(pCache->pCache, pgno+1);
37585 sqlite3GlobalConfig.pcache2.xDestroy(pCache->pCache);
37697 nPage = sqlite3GlobalConfig.pcache2.xPagecount(pCache->pCache);
37717 sqlite3GlobalConfig.pcache2.xCachesize(pCache->pCache,
37727 sqlite3GlobalConfig.pcache2.xShrink(pCache->pCache);
38279 if( sqlite3GlobalConfig.bCoreMutex ){
38324 int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
50798 sqlite3GlobalConfig.sharedCacheEnabled = enable;
52648 if( SQLITE_THREADSAFE && sqlite3GlobalConfig.bCoreMutex ){
63828 if( sqlite3GlobalConfig.xSqllog && v->rc==SQLITE_OK && v->zSql && v->pc>=0 ){
63832 sqlite3GlobalConfig.xSqllog(
63833 sqlite3GlobalConfig.pSqllogArg, v->db, zExpanded, 1
72736 testcase( sqlite3GlobalConfig.xLog!=0 );
97484 if( sz<0 ) sz = sqlite3GlobalConfig.szMmap;
113159 && sqlite3GlobalConfig.bUseCis
119585 if( sqlite3GlobalConfig.isInit ) return SQLITE_OK;
119606 sqlite3GlobalConfig.isMutexInit = 1;
119607 if( !sqlite3GlobalConfig.isMallocInit ){
119611 sqlite3GlobalConfig.isMallocInit = 1;
119612 if( !sqlite3GlobalConfig.pInitMutex ){
119613 sqlite3GlobalConfig.pInitMutex =
119615 if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){
119621 sqlite3GlobalConfig.nRefInitMutex++;
119645 sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);
119646 if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
119648 sqlite3GlobalConfig.inProgress = 1;
119651 if( sqlite3GlobalConfig.isPCacheInit==0 ){
119655 sqlite3GlobalConfig.isPCacheInit = 1;
119659 sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage,
119660 sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
119661 sqlite3GlobalConfig.isInit = 1;
119666 sqlite3GlobalConfig.inProgress = 0;
119668 sqlite3_mutex_leave(sqlite3GlobalConfig.pInitMutex);
119674 sqlite3GlobalConfig.nRefInitMutex--;
119675 if( sqlite3GlobalConfig.nRefInitMutex<=0 ){
119676 assert( sqlite3GlobalConfig.nRefInitMutex==0 );
119677 sqlite3_mutex_free(sqlite3GlobalConfig.pInitMutex);
119678 sqlite3GlobalConfig.pInitMutex = 0;
119723 if( sqlite3GlobalConfig.isInit ){
119730 sqlite3GlobalConfig.isInit = 0;
119732 if( sqlite3GlobalConfig.isPCacheInit ){
119734 sqlite3GlobalConfig.isPCacheInit = 0;
119736 if( sqlite3GlobalConfig.isMallocInit ){
119738 sqlite3GlobalConfig.isMallocInit = 0;
119752 if( sqlite3GlobalConfig.isMutexInit ){
119754 sqlite3GlobalConfig.isMutexInit = 0;
119775 if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE_BKPT;
119786 sqlite3GlobalConfig.bCoreMutex = 0;
119787 sqlite3GlobalConfig.bFullMutex = 0;
119793 sqlite3GlobalConfig.bCoreMutex = 1;
119794 sqlite3GlobalConfig.bFullMutex = 0;
119799 sqlite3GlobalConfig.bCoreMutex = 1;
119800 sqlite3GlobalConfig.bFullMutex = 1;
119805 sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
119810 *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
119818 sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
119823 if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();
119824 *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;
119829 sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
119834 sqlite3GlobalConfig.pScratch = va_arg(ap, void*);
119835 sqlite3GlobalConfig.szScratch = va_arg(ap, int);
119836 sqlite3GlobalConfig.nScratch = va_arg(ap, int);
119841 sqlite3GlobalConfig.pPage = va_arg(ap, void*);
119842 sqlite3GlobalConfig.szPage = va_arg(ap, int);
119843 sqlite3GlobalConfig.nPage = va_arg(ap, int);
119859 sqlite3GlobalConfig.pcache2 = *va_arg(ap, sqlite3_pcache_methods2*);
119863 if( sqlite3GlobalConfig.pcache2.xInit==0 ){
119866 *va_arg(ap, sqlite3_pcache_methods2*) = sqlite3GlobalConfig.pcache2;
119873 sqlite3GlobalConfig.pHeap = va_arg(ap, void*);
119874 sqlite3GlobalConfig.nHeap = va_arg(ap, int);
119875 sqlite3GlobalConfig.mnReq = va_arg(ap, int);
119877 if( sqlite3GlobalConfig.mnReq<1 ){
119878 sqlite3GlobalConfig.mnReq = 1;
119879 }else if( sqlite3GlobalConfig.mnReq>(1<<12) ){
119881 sqlite3GlobalConfig.mnReq = (1<<12);
119884 if( sqlite3GlobalConfig.pHeap==0 ){
119890 memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));
119897 sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();
119900 sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();
119908 sqlite3GlobalConfig.szLookaside = va_arg(ap, int);
119909 sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
119923 sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t);
119924 sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
119929 sqlite3GlobalConfig.bOpenUri = va_arg(ap, int);
119934 sqlite3GlobalConfig.bUseCis = va_arg(ap, int);
119941 sqlite3GlobalConfig.xSqllog = va_arg(ap, SQLLOGFUNC_t);
119942 sqlite3GlobalConfig.pSqllogArg = va_arg(ap, void *);
119953 sqlite3GlobalConfig.mxMmap = mxMmap;
119956 sqlite3GlobalConfig.szMmap = szMmap;
119962 sqlite3GlobalConfig.nHeap = va_arg(ap, int);
120308 if( sqlite3GlobalConfig.xSqllog ){
120310 sqlite3GlobalConfig.xSqllog(sqlite3GlobalConfig.pSqllogArg, db, 0, 2);
121654 if( ((flags & SQLITE_OPEN_URI) || sqlite3GlobalConfig.bOpenUri)
121887 if( sqlite3GlobalConfig.bCoreMutex==0 ){
121894 isThreadsafe = sqlite3GlobalConfig.bFullMutex;
121898 }else if( sqlite3GlobalConfig.sharedCacheEnabled ){
121946 db->szMmap = sqlite3GlobalConfig.szMmap;
122088 setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
122089 sqlite3GlobalConfig.nLookaside);
122096 assert( db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0 );
122109 if( sqlite3GlobalConfig.xSqllog ){
122111 void *pArg = sqlite3GlobalConfig.pSqllogArg;
122112 sqlite3GlobalConfig.xSqllog(pArg, db, zFilename, 0);
122308 testcase( sqlite3GlobalConfig.xLog!=0 );
122315 testcase( sqlite3GlobalConfig.xLog!=0 );
122322 testcase( sqlite3GlobalConfig.xLog!=0 );
122726 sqlite3GlobalConfig.bLocaltimeFault = va_arg(ap, int);
122755 sqlite3GlobalConfig.neverCorrupt = va_arg(ap, int);