aboutsummaryrefslogtreecommitdiff
path: root/src/mem2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem2.c')
-rw-r--r--src/mem2.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mem2.c b/src/mem2.c
index 56da91462..bacc713f2 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.23 2008/03/21 14:22:44 danielk1977 Exp $
+** $Id: mem2.c,v 1.24 2008/03/28 07:42:54 danielk1977 Exp $
*/
#include "sqliteInt.h"
@@ -410,6 +410,15 @@ void sqlite3MemdebugSettitle(const char *zTitle){
sqlite3_mutex_leave(mem.mutex);
}
+void sqlite3MemdebugSync(){
+ struct MemBlockHdr *pHdr;
+ for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
+ void **pBt = (void**)pHdr;
+ pBt -= pHdr->nBacktraceSlots;
+ mem.xBacktrace(pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
+ }
+}
+
/*
** Open the file indicated and write a log of all unfreed memory
** allocations into that log.