AD

SQLITE Source Analysis (3)

Disclaimer: The SQLite source code analysis series Xing (**deepfuture.javaeye**/) original, without author authorization, any human institution can not be reproduced

/ *

** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.

** It determines whether or not the features related to

** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can

** Be overridden at runtime using the sqlite3_config () API.

* /

/ / SQLITE_DEFAULT_MEMSTATUS macro is defined as 0 or 1, at run time can

/ / Use sqlite3_config () API to modify the value

# If! Defined (SQLITE_DEFAULT_MEMSTATUS)

# Define SQLITE_DEFAULT_MEMSTATUS 1

# Endif

/ *

** Exactly one of the following macros must be defined in order to

** Specify which memory allocation subsystem to use.

** The macro does not necessarily have to be defined, the standard memory allocation system used SQLITE_SYSTEM_MALLOC malloc () or malloc () the debug version SQLITE_MEMDEBUG

** SQLITE_SYSTEM_MALLOC / / Use normal system malloc ()

** SQLITE_MEMDEBUG / / Debugging version of system malloc ()

**

** (Historical note: There used to be several other options, but we've

** Pared it down to just these two.)

**

** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as

** The default.

* /

/ / SQLITE_SYSTEM_MALLOC and SQLITE_MEMDEBUG can not both be defined

# If defined (SQLITE_SYSTEM_MALLOC) + defined (SQLITE_MEMDEBUG)> 1

# Error "At most one of the following compile-time configuration options \

is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG "

# Endif

/ / Default SQLITE_SYSTEM_MALLOC standard

# If defined (SQLITE_SYSTEM_MALLOC) + defined (SQLITE_MEMDEBUG) == 0

# Define SQLITE_SYSTEM_MALLOC 1

# Endif

/ *

** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the

** Sizes of memory allocations below this value where possible.

* /

/ / SQLITE_MALLOC_SOFT_LIMIT non-0, then trying to control the distribution of these values within the memory

# If! Defined (SQLITE_MALLOC_SOFT_LIMIT)

# Define SQLITE_MALLOC_SOFT_LIMIT 1024

# Endif

/ *

** We need to define _XOPEN_SOURCE as follows in order to enable

** Recursive mutexes on most Unix systems. But Mac OS X is different.

** The _XOPEN_SOURCE define causes problems for Mac OS X we are told,

** So it is omitted there. See ticket # 2673.

**

** Later we learn that _XOPEN_SOURCE is poorly or incorrectly

** Implemented on some systems. So we avoid defining it at all

** If it is already defined or if it is unneeded because we are

** Not doing a threadsafe build. Ticket # 2681.

**

** See also ticket # 2741.

* /

/ / In most UNIX systems, we need to define _XOPEN_SOURCE allow recursive mutex

/ / For Mac OS X, _XOPEN_SOURCE cause some problems

# If! Defined (_XOPEN_SOURCE) & &! Defined (__DARWIN__) & &! Defined (__APPLE__) & & SQLITE_THREADSAFE

# Define _XOPEN_SOURCE 500 / * Needed to enable pthread recursive mutexes * /

# Endif

/ *

** The TCL headers are only needed when compiling the TCL bindings.

** TCL (Tool Command Language) is an interpreted scripting language. Good cross-platform features and ** scalability, TCL itself is implemented using C language, can easily be expanded through the C language, adding new ** command can also be very convenient to TCL interpreter embedded in your the program. TCL interpreter is also open source the.

** When compiling TCL binding, it requires TCL header files

* /

/ / If you need to bind TCL, include tcl.h

# If defined (SQLITE_TCL) | | defined (TCLSH)

# Include <tcl.h>

# Endif
标签: source code analysis, run time, analysis 3, sqlite, memory allocation, configuration options, endif, macros, source analysis, time configuration, human institution, allocation system, memory allocations
分类: Database
时间: 2010-07-22

相关文章

  1. SQLITE Source Analysis (5)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  2. SQLITE Source Analysis (7)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  3. SQLITE Source Analysis (8)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  4. SQLITE Source Analysis (9)

    / * Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without ...
  5. SQLITE Source Analysis (10)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  6. SQLITE Source Analysis (11)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  7. SQLITE Source Analysis (12)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  8. SQLITE Source Analysis (13)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  9. SQLITE Source Analysis (14)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  10. SQLITE source analysis (16)

    Disclaimer: The SQLite source code analysis series LIU Xing (http://deepfuture.javaeye.com/) original, without ...
  11. SQLITE source analysis (17)

    <! - StartFragment -> / * Disclaimer: The SQLite source code analysis series LIU Xing (http://deepfuture ...
  12. SQLITE source analysis (15)

    Statement: The SQLite source code analysis series Xing (http://deepfuture.iteye.com/) original, without my aut ...
  13. SQLite source code download

    Disclaimer: This SQLITE Source Analysis series Xing (http://deepfuture.javaeye.com/) original, without author ...
  14. SQLite source code analysis (1)

    Disclaimer: The SQLite source code analysis series Xing ( http://deepfuture.javaeye.com/) original, without au ...
  15. sqlite source code analysis (2)

    Disclaimer: The SQLite source code analysis series Xing (http://deepfuture.javaeye.com/) original, without aut ...
  16. SQLite source code analysis (6)

    / * ** Add the ability to override 'extern' * / / / Extern macro definitions can be used to complete the exter ...
  17. sqlite source code analysis (18)

    Disclaimer: The SQLite source code analysis series LIU Xing (http://deepfuture.javaeye.com/) original, without ...
  18. Struts1 Source analysis - international resource file

    Struts1 Source analysis - international resource file 1. URL class diagram 2. Description a) Struts resources ...
  19. HashMap source analysis

    HashMap source analysis public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V&g ...