aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 1a8287b07..4064dadc9 100644
--- a/src/util.c
+++ b/src/util.c
@@ -14,7 +14,7 @@
** This file contains functions for allocating memory, comparing
** strings, and stuff like that.
**
-** $Id: util.c,v 1.166 2006/01/10 15:18:28 drh Exp $
+** $Id: util.c,v 1.167 2006/01/11 16:10:20 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -438,6 +438,7 @@ static void * OSMALLOC(int n){
ThreadData *pTsd = sqlite3ThreadData();
pTsd->nMaxAlloc = MAX(pTsd->nMaxAlloc, pTsd->nAlloc);
#endif
+ assert( sqlite3ThreadData()->mallocAllowed );
if( !failMalloc() ){
u32 *p;
p = (u32 *)sqlite3OsMalloc(n + TESTALLOC_OVERHEAD);
@@ -479,6 +480,7 @@ static void * OSREALLOC(void *pRealloc, int n){
ThreadData *pTsd = sqlite3ThreadData();
pTsd->nMaxAlloc = MAX(pTsd->nMaxAlloc, pTsd->nAlloc);
#endif
+ assert( sqlite3ThreadData()->mallocAllowed );
if( !failMalloc() ){
u32 *p = (u32 *)getOsPointer(pRealloc);
checkGuards(p);