1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +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:
drh
2016-02-05 13:38:36 +00:00
parent 98c7a12c00
commit 575fad6500
22 changed files with 125 additions and 102 deletions

View File

@@ -109,7 +109,7 @@ static void attachFunc(
** hash tables.
*/
if( db->aDb==db->aDbStatic ){
aNew = sqlite3DbMallocRaw(db, sizeof(db->aDb[0])*3 );
aNew = sqlite3DbMallocRawNN(db, sizeof(db->aDb[0])*3 );
if( aNew==0 ) return;
memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2);
}else{