/ Check-in [0a9c63b2]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Patch to the new memory tracing logic that allows it to build even if memory debugging is turned off. (CVS 4927)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0a9c63b227b9c6d2bd0e7b491245947ffc83c828
User & Date: drh 2008-03-28 12:53:38
Context
2008-03-28
15:44
Changes to the Mem structure to reduce the frequency of freeing and reallocating the dynamic buffer. (CVS 4928) check-in: d0bf73d8 user: danielk1977 tags: trunk
12:53
Patch to the new memory tracing logic that allows it to build even if memory debugging is turned off. (CVS 4927) check-in: 0a9c63b2 user: drh tags: trunk
07:42
If memory is leaked when running a test script with the --malloctrace option, write out a file called leaks.sql in the same format as mallocs.sql containing th e leaked applications. The same tools can then be used to examine the stack traces associated with leaked allocations. (CVS 4926) check-in: f1b97ed9 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test_malloc.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
632
633
634
635
636
637
638

639
640
641
642

643
644
645
646
647
648
649
**    May you share freely, never taking more than you give.
**
*************************************************************************
**
** This file contains code used to implement test interfaces to the
** memory allocation subsystem.
**
** $Id: test_malloc.c,v 1.20 2008/03/28 07:42:54 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

................................................................................
    }
    case MB_LOG_CLEAR: {
      test_memdebug_log_clear();
      break;
    }

    case MB_LOG_SYNC: {

      extern void sqlite3MemdebugSync();
      test_memdebug_log_clear();
      mallocLogEnabled = 1;
      sqlite3MemdebugSync();

      break;
    }
  }

  return TCL_OK;
}








|







 







>




>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
**    May you share freely, never taking more than you give.
**
*************************************************************************
**
** This file contains code used to implement test interfaces to the
** memory allocation subsystem.
**
** $Id: test_malloc.c,v 1.21 2008/03/28 12:53:38 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>

................................................................................
    }
    case MB_LOG_CLEAR: {
      test_memdebug_log_clear();
      break;
    }

    case MB_LOG_SYNC: {
#ifdef SQLITE_MEMDEBUG
      extern void sqlite3MemdebugSync();
      test_memdebug_log_clear();
      mallocLogEnabled = 1;
      sqlite3MemdebugSync();
#endif
      break;
    }
  }

  return TCL_OK;
}