Documentation Source Text

Check-in [801e11b806]
Login

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

Overview
Comment:Updates to the matrix generator and to the custombuild.html document.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 801e11b8062f0008ab834bf58c0cb951787e230e
User & Date: drh 2010-02-01 16:19:12
Context
2010-02-09
23:25
Add an evidence mark to a statement in fts3.in. Add an evidence mark to a statement in fts3.in. check-in: 58746651dd user: dan tags: trunk
2010-02-01
16:19
Updates to the matrix generator and to the custombuild.html document. check-in: 801e11b806 user: drh tags: trunk
16:18
Fix a typo in the FTS3 documentation. check-in: f0a07e571f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to matrix.tcl.

    63     63         puts "$srcfile: bad requirement: [string range $nx 0 40]..."
    64     64         set x $nx
    65     65         continue
    66     66       }
    67     67       set orig [string trim $req]
    68     68       regsub -all {<.+?>} $orig {} req
    69     69       regsub -all {\s+} [string trim $req] { } req
    70         -    set req [string map {&lt; < &gt; > &amp; &} $req]
           70  +    set req [string map {&lt; < &gt; > &#91; [ &#93; ] &amp; &} $req]
    71     71       set req [string trim $req]
    72     72       set reqno R-[md5-10x8 $req]
    73     73       db eval {SELECT srcfile AS s2, reqtext as r2
    74     74                FROM requirement WHERE reqno=$reqno} {
    75     75         puts "$srcfile: duplicate [string range $reqno 0 12] in $s2: \[$r2\]"
    76     76       }
    77     77       db eval {
................................................................................
   503    503       } else {
   504    504         regexp {^([^<]|<.+?>)*?\.} $nx req
   505    505         regsub {^([^<]|<.+?>)*?\.} $nx {} nx
   506    506       }
   507    507       set orig [string trim $req]
   508    508       regsub -all {<.+?>} $orig {} req
   509    509       regsub -all {\s+} [string trim $req] { } req
   510         -    set req [string map {&lt; < &gt; > &amp; &} $req]
          510  +    set req [string map {&lt; < &gt; > &#91; [ &#93; ] &amp; &} $req]
   511    511       set req [string trim $req]
   512    512       set rno R-[md5-10x8 $req]
   513    513       set shortrno [string range $rno 0 12]
   514    514       append out "<a name=\"$rno\"></a><font color=\"blue\"><b>\n"
   515    515       set link "<a href=\"$matrixpath#$rno\" style=\"color: #0000ff\">"
   516    516       append out "$link$shortrno</a>:\[</b></font>"
   517    517       if {$proof($rno)>=2} {

Changes to pages/custombuild.in.

    25     25   Most developers should be able to completely ignore this document
    26     26   and simply build SQLite from
    27     27   <a href="amalgamation.html">the amalgamation</a> without any
    28     28   special knowledge and without taking any special actions.</i></blockquote>
    29     29   
    30     30   <p>However, highly tuned and specialized
    31     31   applications may want or need to replace some of
    32         -SQLite's built-in system interface with alternative implementations
           32  +SQLite's built-in system interfaces with alternative implementations
    33     33   more suitable for the needs of the application.  SQLite is designed
    34     34   to be easily reconfigured at compile-time to meet the specific
    35     35   needs of individual projects.  Among the compile-time configuration
    36     36   options for SQLite are these:</p>
    37     37   
    38     38   <ul>
    39     39   <li><p> Replace the built-in mutex subsystem with an alternative
................................................................................
   197    197   There is also on-going work with experimental memory allocators that
   198    198   satisfy all memory requests from a single fixed memory buffer handed
   199    199   to SQLite at application start.  Additional information on these
   200    200   experimental memory allocators will be provided in a future revision
   201    201   of this document.</p>
   202    202   
   203    203   <p>SQLite supports the ability of an application to specify an alternative
   204         -memory allocator at run-time using the [sqlite3_config()] interface.
          204  +memory allocator at run-time by filling in an instance of the
          205  +[sqlite3_mem_methods] object with pointers to the routines of the
          206  +alternative implementation then registering the new alternative
          207  +implementation using the [sqlite3_config()] interface.
   205    208   For example:</p>
   206    209   
   207    210   <blockquote><pre>
   208         -sqlite3_config(SQLITE_CONFIG_MALLOC, dlmalloc, dlfree, dlrealloc, dlmalloc_usable_size);
          211  +sqlite3_config(SQLITE_CONFIG_MALLOC, &my_malloc_implementation);
   209    212   </pre></blockquote>
   210    213   
   211         -<p>The [SQLITE_CONFIG_MALLOC] setting to [sqlite3_config()] passes four
   212         -function pointers into SQLite.  The first three functions work exactly
   213         -like malloc(), free(), and realloc(), respectively, from the standard
   214         -C library.  The fourth function pointer must be for a routine that
   215         -returns the size of a memory allocation given a pointer to that allocation.
   216         -In the default memory allocator implementation for SQLite, these fourth
   217         -"memsize" function is implemented by prepending an 8-byte size integer
   218         -to the beginning of every allocation.  The memsize function is not a
   219         -standard part of must memory alloction libraries and so must be implemented
   220         -in this way.  However, Doug Lea's dlmalloc implementation, as shown in the
   221         -example above, does provide an implementation of memsize which, if used,
   222         -reduces the size overhead and execution time of every memory allocation
   223         -and deallocation.</p>
   224         -
   225         -<p><i>TBD: Talk about alternative zero-malloc implementations and how to
   226         -select them at compile-time.</i></p>
   227         -
   228         -<p><i>TBD: Talk about how to disable any built-in memory allocator so that
   229         -an application is required to register the memory allocator at
   230         -startup.</i></p>
          214  +<p>SQLite makes a copy of the content of the [sqlite3_mem_methods] object
          215  +so the object can be modified after the [sqlite3_config()] call returns.</p>
   231    216   
   232    217   <h2>4.0 Adding New Virtual File Systems</h2>
   233    218   
   234    219   <p>Since [version 3.5.0], SQLite has supported an interface called the
   235    220   [sqlite3_vfs | virtual file system] or "VFS".
   236    221   This object is somewhat misnamed since it
   237         -is really an interface to whole underlying operating system, not
          222  +is really an interface to the whole underlying operating system, not
   238    223   just the filesystem.</p>
   239    224   
   240    225   <p> One of the interesting features
   241    226   of the VFS interface is that SQLite can support multiple VFSes at the
   242    227   same time.  Each [database connection] has to choose a single VFS for its
   243    228   use when the connection is first opened using [sqlite3_open_v2()].
   244    229   But if a process contains multiple [database connections] each can choose