diff options
author | drh <drh@noemail.net> | 2007-08-22 22:04:37 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-08-22 22:04:37 +0000 |
commit | ed138fb3bc8e55a6ae93669899dce79e5e26c65a (patch) | |
tree | b47d13ffd4af69fc5372d4a2a845404079c7cc8b /src/mem2.c | |
parent | f3a65f7e443865f00b6799ba9637604b0ae55dc5 (diff) | |
download | sqlite-ed138fb3bc8e55a6ae93669899dce79e5e26c65a.tar.gz sqlite-ed138fb3bc8e55a6ae93669899dce79e5e26c65a.zip |
All of the malloc test cases run. Still seeing failures in malloc4.test. (CVS 4272)
FossilOrigin-Name: 205d0b881d541db65837ce6cf44d58d607635bc2
Diffstat (limited to 'src/mem2.c')
-rw-r--r-- | src/mem2.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem2.c b/src/mem2.c index 57a610225..d9653ee81 100644 --- a/src/mem2.c +++ b/src/mem2.c @@ -12,7 +12,7 @@ ** This file contains the C functions that implement a memory ** allocation subsystem for use by SQLite. ** -** $Id: mem2.c,v 1.6 2007/08/22 20:18:22 drh Exp $ +** $Id: mem2.c,v 1.7 2007/08/22 22:04:37 drh Exp $ */ /* @@ -455,6 +455,15 @@ int sqlite3_memdebug_fail(int iFail, int iRepeat){ } /* +** This routine returns the number of successful mallocs remaining until +** the next simulated malloc failure. -1 is returned if no simulated +** failure is currently scheduled. +*/ +int sqlite3_memdebug_pending(void){ + return mem.iFail-1; +} + +/* ** The following two routines are used to assert that no memory ** allocations occur between one call and the next. The use of ** these routines does not change the computed results in any way. |