aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2014-11-04 14:22:27 +0000
committerdrh <drh@noemail.net>2014-11-04 14:22:27 +0000
commitcbd55b0362c8dd2a0c7c3bd0bc56bd16ccd2d962 (patch)
treeb9b226e270b35966a5db994e105dda217dc23565 /src/malloc.c
parent5279d3433c2ef6089559eb65d3ed1a3e298cc3b3 (diff)
downloadsqlite-cbd55b0362c8dd2a0c7c3bd0bc56bd16ccd2d962.tar.gz
sqlite-cbd55b0362c8dd2a0c7c3bd0bc56bd16ccd2d962.zip
Change the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
buffer is used per thread. Use the generic heap memory allocator for the WalIterator object when running a checkpoint. FossilOrigin-Name: 391c9b85abcb5ba300fb2e116384639310c69ed2
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 6fb9d53d1..4960f91e0 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -377,11 +377,12 @@ void *sqlite3ScratchMalloc(int n){
#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
- /* Verify that no more than two scratch allocations per thread
- ** are outstanding at one time. (This is only checked in the
- ** single-threaded case since checking in the multi-threaded case
- ** would be much more complicated.) */
- assert( scratchAllocOut<=1 );
+ /* EVIDENCE-OF: R-12970-05880 SQLite will not use more than one scratch
+ ** buffers per thread.
+ **
+ ** This can only be checked in single-threaded mode.
+ */
+ assert( scratchAllocOut==0 );
if( p ) scratchAllocOut++;
#endif