/ Check-in [d96272f0]
Login

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

Overview
Comment:Proposed template preprocessor magic for activating mmap only on platforms where we know it works.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | experimental-mmap
Files: files | file ages | folders
SHA1: d96272f031102514b02bd839aac9e37618872200
User & Date: drh 2013-04-02 10:29:13
Context
2013-04-02
12:04
Add test cases for errors in mmap() or mremap() is os_unix.c. check-in: 3098a3c1 user: dan tags: experimental-mmap
10:29
Proposed template preprocessor magic for activating mmap only on platforms where we know it works. check-in: d96272f0 user: drh tags: experimental-mmap
01:45
Reorder two conditions to make coverage testing easier. check-in: 793ba4e9 user: drh tags: experimental-mmap
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/sqliteLimit.h.

   206    206   #ifndef SQLITE_MAX_TRIGGER_DEPTH
   207    207   # define SQLITE_MAX_TRIGGER_DEPTH 1000
   208    208   #endif
   209    209   
   210    210   /*
   211    211   ** Default maximum size of memory used by xFetch in the VFS.
   212    212   */
          213  +#ifdef __APPLE__
          214  +# include <TargetConditions.h>
          215  +# if defined(TARGET_OS_IPHONE)
          216  +#   define SQLITE_DEFAULT_MMAP_LIMIT 0
          217  +# endif
          218  +#endif
   213    219   #ifndef SQLITE_DEFAULT_MMAP_LIMIT
   214         -# define SQLITE_DEFAULT_MMAP_LIMIT (256*1024*1024)
          220  +# if defined(__linux__) \
          221  +  || defined(_WIN32) \
          222  +  || (defined(__APPLE__) && defined(__MACH__)  && !defined(TARGET_OS_IPHONE)) \
          223  +  || defined(__sun) \
          224  +  || defined(__DragonFly__) \
          225  +  || defined(__FreeBSD__) \
          226  +  || defined(__NetBSD__) \
          227  +  || defined(__OpenBSD__)
          228  +#   define SQLITE_DEFAULT_MMAP_LIMIT (256*1024*1024)
          229  +# else
          230  +#   define SQLITE_DEFAULT_MMAP_LIMIT 0
          231  +# endif
   215    232   #endif