mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority
cases where db is guaranteed to be not NULL. FossilOrigin-Name: 0a802e96ab06e2643834b83671fa8353da1a348d
This commit is contained in:
@@ -313,7 +313,7 @@ static void sampleClear(sqlite3 *db, Stat4Sample *p){
|
||||
static void sampleSetRowid(sqlite3 *db, Stat4Sample *p, int n, const u8 *pData){
|
||||
assert( db!=0 );
|
||||
if( p->nRowid ) sqlite3DbFree(db, p->u.aRowid);
|
||||
p->u.aRowid = sqlite3DbMallocRaw(db, n);
|
||||
p->u.aRowid = sqlite3DbMallocRawNN(db, n);
|
||||
if( p->u.aRowid ){
|
||||
p->nRowid = n;
|
||||
memcpy(p->u.aRowid, pData, n);
|
||||
@@ -1115,7 +1115,7 @@ static void analyzeOneTable(
|
||||
if( nColTest>0 ){
|
||||
int endDistinctTest = sqlite3VdbeMakeLabel(v);
|
||||
int *aGotoChng; /* Array of jump instruction addresses */
|
||||
aGotoChng = sqlite3DbMallocRaw(db, sizeof(int)*nColTest);
|
||||
aGotoChng = sqlite3DbMallocRawNN(db, sizeof(int)*nColTest);
|
||||
if( aGotoChng==0 ) continue;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user