diff options
author | drh <drh@noemail.net> | 2015-04-29 16:50:28 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-04-29 16:50:28 +0000 |
commit | f3cdcdccbeedd4de04d74eb95ecc244eb90e4082 (patch) | |
tree | f79e86511e5347f496fb87be780a37e125f29e15 /src/wal.c | |
parent | b4a91a9a8859fc021ec4d3de08eb49a257d62a14 (diff) | |
download | sqlite-f3cdcdccbeedd4de04d74eb95ecc244eb90e4082.tar.gz sqlite-f3cdcdccbeedd4de04d74eb95ecc244eb90e4082.zip |
Use sqlite3_malloc64() in place of sqlite3_malloc() internally.
FossilOrigin-Name: 48f553b05c05373c0af4b9c3a542979db3a2ee19
Diffstat (limited to 'src/wal.c')
-rw-r--r-- | src/wal.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -522,7 +522,7 @@ static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){ if( pWal->nWiData<=iPage ){ int nByte = sizeof(u32*)*(iPage+1); volatile u32 **apNew; - apNew = (volatile u32 **)sqlite3_realloc((void *)pWal->apWiData, nByte); + apNew = (volatile u32 **)sqlite3_realloc64((void *)pWal->apWiData, nByte); if( !apNew ){ *ppPage = 0; return SQLITE_NOMEM; @@ -1147,7 +1147,7 @@ static int walIndexRecover(Wal *pWal){ /* Malloc a buffer to read frames into. */ szFrame = szPage + WAL_FRAME_HDRSIZE; - aFrame = (u8 *)sqlite3_malloc(szFrame); + aFrame = (u8 *)sqlite3_malloc64(szFrame); if( !aFrame ){ rc = SQLITE_NOMEM; goto recovery_error; @@ -1540,7 +1540,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){ nByte = sizeof(WalIterator) + (nSegment-1)*sizeof(struct WalSegment) + iLast*sizeof(ht_slot); - p = (WalIterator *)sqlite3_malloc(nByte); + p = (WalIterator *)sqlite3_malloc64(nByte); if( !p ){ return SQLITE_NOMEM; } @@ -1550,7 +1550,7 @@ static int walIteratorInit(Wal *pWal, WalIterator **pp){ /* Allocate temporary space used by the merge-sort routine. This block ** of memory will be freed before this function returns. */ - aTmp = (ht_slot *)sqlite3_malloc( + aTmp = (ht_slot *)sqlite3_malloc64( sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast) ); if( !aTmp ){ |