/ Check-in [218c6184]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Fix the #ifdef around sqlite3OutstandingMallocs() in test1.c. (CVS 2978)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 218c6184c8edec22f9b56b3c9446d27fda9c1e00
User & Date: drh 2006-01-19 11:28:07
Context
2006-01-19
17:42
Make sure sqlite3_thread_cleanup() does not try to allocate memory. (CVS 2979) check-in: 0208e422 user: drh tags: trunk
11:28
Fix the #ifdef around sqlite3OutstandingMallocs() in test1.c. (CVS 2978) check-in: 218c6184 user: drh tags: trunk
08:43
Account for read-uncommitted cursors in sqlite3BtreeClearTable(). (CVS 2977) check-in: 95079832 user: danielk1977 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/test1.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing the printf() interface to SQLite.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.198 2006/01/19 07:18:14 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include "os.h"
#include <stdlib.h>
#include <string.h>

................................................................................
  ClientData clientData,
  Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
  int objc,              /* Number of arguments */
  Tcl_Obj *CONST objv[]  /* Command arguments */
){
  extern int sqlite3OutstandingMallocs(Tcl_Interp *interp);

#if defined(SQLITE_DEBUG) && defined(SQLITE_MEMDEBUG)
  if( objc==2 ){
    const char *zArg = Tcl_GetString(objv[1]);
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
    ThreadData const *pTd = sqlite3ThreadDataReadOnly();
    if( 0==strcmp(zArg, "-bytes") ){
      Tcl_SetObjResult(interp, Tcl_NewIntObj(pTd->nAlloc));
    }else if( 0==strcmp(zArg, "-clearmaxbytes") ){







|







 







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Code for testing the printf() interface to SQLite.  This code
** is not included in the SQLite library.  It is used for automated
** testing of the SQLite library.
**
** $Id: test1.c,v 1.199 2006/01/19 11:28:07 drh Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
#include "os.h"
#include <stdlib.h>
#include <string.h>

................................................................................
  ClientData clientData,
  Tcl_Interp *interp,    /* The TCL interpreter that invoked this command */
  int objc,              /* Number of arguments */
  Tcl_Obj *CONST objv[]  /* Command arguments */
){
  extern int sqlite3OutstandingMallocs(Tcl_Interp *interp);

#if defined(SQLITE_DEBUG) && defined(SQLITE_MEMDEBUG) && SQLITE_MEMDEBUG>1
  if( objc==2 ){
    const char *zArg = Tcl_GetString(objv[1]);
#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
    ThreadData const *pTd = sqlite3ThreadDataReadOnly();
    if( 0==strcmp(zArg, "-bytes") ){
      Tcl_SetObjResult(interp, Tcl_NewIntObj(pTd->nAlloc));
    }else if( 0==strcmp(zArg, "-clearmaxbytes") ){