/ Check-in [a11241d6]
Login

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

Overview
Comment:Removed a few more small parts of memsys6 code, including some config and test code for it; (CVS 5872)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a11241d6fbc9e0408d5adc73d494b85124d2d609
User & Date: shane 2008-11-10 18:05:36
Context
2008-11-10
18:20
Add check for ifcapable autovacuum to vacuum2-3.3 test. Ticket #3435. (CVS 5873) check-in: fc36f2fc user: shane tags: trunk
18:05
Removed a few more small parts of memsys6 code, including some config and test code for it; (CVS 5872) check-in: a11241d6 user: shane tags: trunk
17:14
In btree.c, omit calls to setChildPtrmaps() if SQLITE_OMIT_AUTOVACUUM is defined. Ticket #3439. (CVS 5871) check-in: e0f07323 user: shane tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

    10     10   **
    11     11   *************************************************************************
    12     12   ** Main file for the SQLite library.  The routines in this file
    13     13   ** implement the programmer interface to the library.  Routines in
    14     14   ** other files are for internal use by SQLite and should not be
    15     15   ** accessed by users of the library.
    16     16   **
    17         -** $Id: main.c,v 1.510 2008/11/04 13:46:28 drh Exp $
           17  +** $Id: main.c,v 1.511 2008/11/10 18:05:36 shane Exp $
    18     18   */
    19     19   #include "sqliteInt.h"
    20     20   #include <ctype.h>
    21     21   
    22     22   #ifdef SQLITE_ENABLE_FTS3
    23     23   # include "fts3.h"
    24     24   #endif
................................................................................
   334    334   #endif
   335    335   #ifdef SQLITE_ENABLE_MEMSYS5
   336    336           sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();
   337    337   #endif
   338    338         }
   339    339         break;
   340    340       }
   341         -#endif
   342         -
   343         -#if defined(SQLITE_ENABLE_MEMSYS6)
   344         -    case SQLITE_CONFIG_CHUNKALLOC: {
   345         -      sqlite3GlobalConfig.nSmall = va_arg(ap, int);
   346         -      sqlite3GlobalConfig.m = *sqlite3MemGetMemsys6();
   347         -      break;
   348         -    }
   349    341   #endif
   350    342   
   351    343       case SQLITE_CONFIG_LOOKASIDE: {
   352    344         sqlite3GlobalConfig.szLookaside = va_arg(ap, int);
   353    345         sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
   354    346         break;
   355    347       }

Changes to src/sqlite.h.in.

    26     26   ** on how SQLite interfaces are suppose to operate.
    27     27   **
    28     28   ** The name of this file under configuration management is "sqlite.h.in".
    29     29   ** The makefile makes some minor changes to this file (such as inserting
    30     30   ** the version number) and changes its name to "sqlite3.h" as
    31     31   ** part of the build process.
    32     32   **
    33         -** @(#) $Id: sqlite.h.in,v 1.410 2008/11/10 17:08:49 shane Exp $
           33  +** @(#) $Id: sqlite.h.in,v 1.411 2008/11/10 18:05:36 shane Exp $
    34     34   */
    35     35   #ifndef _SQLITE3_H_
    36     36   #define _SQLITE3_H_
    37     37   #include <stdarg.h>     /* Needed for the definition of va_list */
    38     38   
    39     39   /*
    40     40   ** Make sure we can call this stuff from C++.
................................................................................
  1328   1328   #define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
  1329   1329   #define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
  1330   1330   #define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
  1331   1331   #define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
  1332   1332   #define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
  1333   1333   #define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
  1334   1334   #define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
  1335         -#define SQLITE_CONFIG_CHUNKALLOC   12  /* int threshold */
         1335  +/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ 
  1336   1336   #define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
  1337   1337   
  1338   1338   /*
  1339   1339   ** CAPI3REF: Configuration Options {H10170} <S20000>
  1340   1340   ** EXPERIMENTAL
  1341   1341   **
  1342   1342   ** These constants are the available integer configuration options that

Changes to src/sqliteInt.h.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** Internal interface definitions for SQLite.
    13     13   **
    14         -** @(#) $Id: sqliteInt.h,v 1.788 2008/11/05 16:37:35 drh Exp $
           14  +** @(#) $Id: sqliteInt.h,v 1.789 2008/11/10 18:05:36 shane Exp $
    15     15   */
    16     16   #ifndef _SQLITEINT_H_
    17     17   #define _SQLITEINT_H_
    18     18   
    19     19   /*
    20     20   ** Include the configuration header output by 'configure' if we're using the
    21     21   ** autoconf-based build
................................................................................
   459    459   ** the heap.  When WSD is unsupported, the variable declarations scattered
   460    460   ** throughout the SQLite code must become constants instead.  The SQLITE_WSD
   461    461   ** macro is used for this purpose.  And instead of referencing the variable
   462    462   ** directly, we use its constant as a key to lookup the run-time allocated
   463    463   ** buffer that holds real variable.  The constant is also the initializer
   464    464   ** for the run-time allocated buffer.
   465    465   **
   466         -** In the usually case where WSD is supported, the SQLITE_WSD and GLOBAL
          466  +** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL
   467    467   ** macros become no-ops and have zero performance impact.
   468    468   */
   469    469   #ifdef SQLITE_OMIT_WSD
   470    470     #define SQLITE_WSD const
   471    471     #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
   472    472     #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
   473    473     int sqlite3_wsd_init(int N, int J);
................................................................................
  1968   1968     int szPage;                       /* Size of each page in pPage[] */
  1969   1969     int nPage;                        /* Number of pages in pPage[] */
  1970   1970     int isInit;                       /* True after initialization has finished */
  1971   1971     int inProgress;                   /* True while initialization in progress */
  1972   1972     int isMallocInit;                 /* True after malloc is initialized */
  1973   1973     sqlite3_mutex *pInitMutex;        /* Mutex used by sqlite3_initialize() */
  1974   1974     int nRefInitMutex;                /* Number of users of pInitMutex */
  1975         -  int nSmall;                       /* alloc size threshold used by mem6.c */
  1976   1975     int mxParserStack;                /* maximum depth of the parser stack */
  1977   1976     int sharedCacheEnabled;           /* true if shared-cache mode enabled */
  1978   1977   };
  1979   1978   
  1980   1979   /*
  1981   1980   ** Context pointer passed down through the tree-walk.
  1982   1981   */

Changes to src/test_malloc.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   **
    13     13   ** This file contains code used to implement test interfaces to the
    14     14   ** memory allocation subsystem.
    15     15   **
    16         -** $Id: test_malloc.c,v 1.49 2008/10/15 11:43:55 danielk1977 Exp $
           16  +** $Id: test_malloc.c,v 1.50 2008/11/10 18:05:36 shane Exp $
    17     17   */
    18     18   #include "sqliteInt.h"
    19     19   #include "tcl.h"
    20     20   #include <stdlib.h>
    21     21   #include <string.h>
    22     22   #include <assert.h>
    23     23   
................................................................................
   963    963     }
   964    964     if( Tcl_GetBooleanFromObj(interp, objv[1], &enable) ) return TCL_ERROR;
   965    965     rc = sqlite3_config(SQLITE_CONFIG_MEMSTATUS, enable);
   966    966     Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
   967    967     return TCL_OK;
   968    968   }
   969    969   
   970         -/*
   971         -** Usage:    sqlite3_config_chunkalloc 
   972         -**
   973         -*/
   974         -static int test_config_chunkalloc(
   975         -  void * clientData,
   976         -  Tcl_Interp *interp,
   977         -  int objc,
   978         -  Tcl_Obj *CONST objv[]
   979         -){
   980         -  int rc;
   981         -  int nThreshold;
   982         -  if( objc!=2 ){
   983         -    Tcl_WrongNumArgs(interp, 1, objv, "THRESHOLD");
   984         -    return TCL_ERROR;
   985         -  }
   986         -  if( Tcl_GetIntFromObj(interp, objv[1], &nThreshold) ) return TCL_ERROR;
   987         -  rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC, nThreshold);
   988         -  Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
   989         -  return TCL_OK;
   990         -}
   991         -
   992    970   /*
   993    971   ** Usage:    sqlite3_config_lookaside  SIZE  COUNT
   994    972   **
   995    973   */
   996    974   static int test_config_lookaside(
   997    975     void * clientData,
   998    976     Tcl_Interp *interp,
................................................................................
  1335   1313        { "sqlite3_config_scratch",     test_config_scratch           ,0 },
  1336   1314        { "sqlite3_config_pagecache",   test_config_pagecache         ,0 },
  1337   1315        { "sqlite3_status",             test_status                   ,0 },
  1338   1316        { "sqlite3_db_status",          test_db_status                ,0 },
  1339   1317        { "install_malloc_faultsim",    test_install_malloc_faultsim  ,0 },
  1340   1318        { "sqlite3_config_heap",        test_config_heap              ,0 },
  1341   1319        { "sqlite3_config_memstatus",   test_config_memstatus         ,0 },
  1342         -     { "sqlite3_config_chunkalloc",  test_config_chunkalloc        ,0 },
  1343   1320        { "sqlite3_config_lookaside",   test_config_lookaside         ,0 },
  1344   1321        { "sqlite3_config_error",       test_config_error             ,0 },
  1345   1322        { "sqlite3_db_config_lookaside",test_db_config_lookaside      ,0 },
  1346   1323        { "sqlite3_dump_memsys3",       test_dump_memsys3             ,3 },
  1347   1324        { "sqlite3_dump_memsys5",       test_dump_memsys3             ,5 }
  1348   1325     };
  1349   1326     int i;

Changes to test/permutations.test.

     5      5   #
     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12         -# $Id: permutations.test,v 1.36 2008/10/17 18:51:53 danielk1977 Exp $
           12  +# $Id: permutations.test,v 1.37 2008/11/10 18:05:36 shane Exp $
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   
    17     17   # Argument processing.
    18     18   #
    19     19   #puts "PERM-DEBUG: argv=$argv"
................................................................................
   561    561     } -shutdown {
   562    562       catch {db close}
   563    563       sqlite3_shutdown
   564    564       install_mutex_counters 0
   565    565     }
   566    566   }
   567    567   
   568         -run_tests "memsys6" -description {
   569         -  Run tests using the allocator in mem6.c.
   570         -} -exclude {
   571         -  capi3.test capi3c.test 
   572         -} -initialize {
   573         -  catch {db close}
   574         -  sqlite3_reset_auto_extension
   575         -  sqlite3_shutdown
   576         -  sqlite3_config_chunkalloc 0
   577         -  install_malloc_faultsim 1 
   578         -  sqlite3_initialize
   579         -  autoinstall_test_functions
   580         -} -shutdown {
   581         -  catch {db close}
   582         -  sqlite3_reset_auto_extension
   583         -  sqlite3_shutdown
   584         -  sqlite3_config_heap 0 0
   585         -  install_malloc_faultsim 1 
   586         -  sqlite3_initialize
   587         -}
   588         -
   589    568   # run_tests "crash_safe_append" -description {
   590    569   #   Run crash.test with persistent journals on a SAFE_APPEND file-system.
   591    570   # } -initialize {
   592    571   #   rename crashsql sa_crashsql
   593    572   #   proc crashsql {args} {
   594    573   #     set options [lrange $args 0 [expr {[llength $args]-2}]]
   595    574   #     lappend options -char safe_append