aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-09-18 01:21:43 +0000
committerdrh <drh@noemail.net>2014-09-18 01:21:43 +0000
commit3329a63ac5ca50861d926248b159106cd9fd96a5 (patch)
treef5554b8bf0c7821fb3055e76d6f3a54c5af2832e /src/malloc.c
parentca5506bdc482bbfde2fe3dd6a93f079e9801ce60 (diff)
downloadsqlite-3329a63ac5ca50861d926248b159106cd9fd96a5.tar.gz
sqlite-3329a63ac5ca50861d926248b159106cd9fd96a5.zip
Fix compiler warnings and change the nullMem structure initializer into a
format that MSVC can understand. FossilOrigin-Name: 163bfae8583b2d3002a3a43d6bf8a66fefd73acb
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/malloc.c b/src/malloc.c
index daf646bc3..a4acd2f0c 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -305,7 +305,7 @@ void *sqlite3Malloc(u64 n){
p = 0;
}else if( sqlite3GlobalConfig.bMemstat ){
sqlite3_mutex_enter(mem0.mutex);
- mallocWithAlarm(n, &p);
+ mallocWithAlarm((int)n, &p);
sqlite3_mutex_leave(mem0.mutex);
}else{
p = sqlite3GlobalConfig.m.xMalloc((int)n);
@@ -549,7 +549,7 @@ void *sqlite3Realloc(void *pOld, u64 nBytes){
pNew = pOld;
}else if( sqlite3GlobalConfig.bMemstat ){
sqlite3_mutex_enter(mem0.mutex);
- sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, nBytes);
+ sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, (int)nBytes);
nDiff = nNew - nOld;
if( sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED) >=
mem0.alarmThreshold-nDiff ){
@@ -559,7 +559,7 @@ void *sqlite3Realloc(void *pOld, u64 nBytes){
assert( sqlite3MemdebugNoType(pOld, ~MEMTYPE_HEAP) );
pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
if( pNew==0 && mem0.alarmCallback ){
- sqlite3MallocAlarm(nBytes);
+ sqlite3MallocAlarm((int)nBytes);
pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
}
if( pNew ){
@@ -699,7 +699,7 @@ void *sqlite3DbRealloc(sqlite3 *db, void *p, u64 n){
assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
assert( sqlite3MemdebugHasType(p, MEMTYPE_LOOKASIDE|MEMTYPE_HEAP) );
sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
- pNew = sqlite3_realloc(p, n);
+ pNew = sqlite3_realloc64(p, n);
if( !pNew ){
sqlite3MemdebugSetType(p, MEMTYPE_DB|MEMTYPE_HEAP);
db->mallocFailed = 1;