aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
Commit message (Collapse)AuthorAge
...
* Only default HAVE_POSIX_FALLOCATE on for linux, and then only if it is notdrh2013-06-19
| | | | | previously defined. FossilOrigin-Name: 2b2ade92788be623af6f57e37d98994be2cec142
* Only enable posix_fallocate by default on linux and mac.drh2013-06-19
| | | FossilOrigin-Name: b9b30d4f9845d212e2d3206abbf2795099e5d71d
* Cause the mmap_size PRAGMA to immediately change the mmap space if thedrh2013-05-23
| | | | | | database connection is already active. In particular, reducing mmap_size will immediately free up process address space. FossilOrigin-Name: 761177927cb51e4f5e66061ca39cf37edbe8346b
* In os_unix.c and os_win.c, initialize the default mmap-limit of a new file ↵dan2013-05-17
| | | | | descriptor to the current global default mmap-limit, not the current global maximum allowable mmap-limit. FossilOrigin-Name: 1def4ea3a02afc19648f4cd928b247f8fa55da80
* Add assert()s to the implementation of xRead() in the built-in VFSes to drh2013-05-09
| | | | | verify that the offset parameter is always non-negative. FossilOrigin-Name: cf5c3642247fdd34d87f0368594cd7b8f081636a
* Minor fixes for compilation with SQLITE_OMIT_WAL defined.dan2013-05-02
| | | FossilOrigin-Name: b81e87e72b976e7157a53a50abc5422e2a6c4c39
* Untested fix for building on VxWorks.drh2013-04-27
| | | FossilOrigin-Name: f14d55cf358b0392d3b8cd61dc85f43a610a8edf
* Avoid using posix_fallocate() in WAL mode, as it is not supported by all ↵dan2013-04-26
| | | | | file-systems. FossilOrigin-Name: 9c7523dabf4aee609287732ce787c9b9a9087e7f
* Fix harmless compiler warnings.drh2013-04-22
| | | FossilOrigin-Name: 1a1cf5aa86734c832d845e07780262a178188d56
* Refactoring the mmap interface. The controlling pragma is now "mmap_size"drh2013-04-15
| | | | | | | | | | | | | | | | instead of "mmap_limit". Also change SQLITE_CONFIG_MMAP_LIMIT and SQLITE_FCNTL_MMAP_LIMIT to SQLITE_CONFIG_MMAP_SIZE and SQLITE_FCNTL_MMAP_SIZE, respecctively. The default mmap_size is now always 0, meaning that memory mapped I/O is off by default. There is a new compile-time option SQLITE_MAX_MMAP_SIZE that determines a hard upper bound on the mmap_size. Setting SQLITE_MAX_MMAP_SIZE to zero disables the memory-mapped I/O logic and causes it to be omitted from the build. An extra argument is added to SQLITE_CONFIG_MMAP_SIZE that can optionally lower the SQLITE_MAX_MMAP_SIZE at start-time. The SQLITE_MAX_MMAP_SIZE is zero for platforms where we know that it does not work, meaning that it cannot be turned on by mistake on those platforms. FossilOrigin-Name: ea1404a10abd7f68e1f8e0708c8a3199d1f79665
* Have the UNIX VFS issue warnings via sqlite3_log() if a database file isdrh2013-04-11
| | | | | renamed or unlinked or linked to more than one name while the file is open. FossilOrigin-Name: e238dcf9189c029fbdcf89339e21d9cdd8fbf2c5
* Add extra #ifndef statements in os_unix.c and os_win.c to make sure thedrh2013-04-09
| | | | | memory mapped I/O really is disabled when SQLITE_DISABLE_MMAP is set. FossilOrigin-Name: c1e2523c9051782569291fff998140f7e0b70b6d
* Handle the case in os_unix.c where SQLITE_FCNTL_MMAP_LIMIT requests that the ↵dan2013-04-08
| | | | | mmap limit be set to a value smaller than the current mapping. FossilOrigin-Name: 360473493ec1a7094a2b1c5436f3b70914a6dfdd
* Change the mmap_limit pragma to report the new limit, or to report thedrh2013-04-03
| | | | | | | existing limit if called with no arguments. Report the default mmap_limit as part of PRAGMA compile_options. Set the default mmmap_limit to 0 for all systems other than linux, mac, windows, and solaris. FossilOrigin-Name: 2d9f1327fe79e40435ce1e2594d7cd9a5aea0ef2
* Initialize the mmap_limit of temporary files to the configured mmap_limit.drh2013-04-03
| | | FossilOrigin-Name: 24bab7596bb7385981a5d331df5eeb05353547f7
* Fix the unix driver to check defined(_BSD_SOURCE) rather than just the plaindrh2013-04-03
| | | | | _BSD_SOURCE macro. This fixes the build for OpenBSD. FossilOrigin-Name: 1dd42ef4144ee08fb4ee1676d934a56a0e34bac2
* Fix a resource leak in os_unix.c.dan2013-04-02
| | | FossilOrigin-Name: b29cda03fe4e8d8f5b5acbbea2d69f284a2bdf23
* Add test cases for errors in mmap() or mremap() is os_unix.c.dan2013-04-02
| | | FossilOrigin-Name: 3098a3c1e7305033904a496ef534cb312a876fab
* Remove a debugging printf() accidently left in the previous check-in.drh2013-04-01
| | | FossilOrigin-Name: 8198cdd8ac5dcc1c677fffa869ac965186b96abf
* Add the SQLITE_CONFIG_MMAP_LIMIT configuration option for overriding thedrh2013-04-01
| | | | | | | | SQLITE_DEFAULT_MMAP_LIMIT compile-time setting. Enhance "PRAGMA mmap_limit" so that without a specific database name, it sets the limit on all database files and changes the default for any future databases that might be added using ATTACH. FossilOrigin-Name: 78141d0a16dd1d56b575fccd149de7fa789cb06c
* Attempt to emulate mremap() on non-Linux systems by allocating a second ↵dan2013-04-01
| | | | | mapping immediately following the first in virtual memory. FossilOrigin-Name: 4d67433db8fb4754ae6b192945e479f3d7bad579
* Fix a comment in os_unix.c. No code changes.drh2013-03-26
| | | FossilOrigin-Name: 72813b8ec924b91583c679668f7c4561dff82a02
* Memory-mapped I/O is now on by default. The "PRAGMA mmap_limit(N)" can bedrh2013-03-25
| | | | | | | used to issue a hint to the VFS to limit mmap space to N bytes. The VFS is free to ignore that hint if desired. However, if "PRAGMA mmap_limit(0)" is used, xFetch is never called. FossilOrigin-Name: 1b37c4effdd03aa2ea938a71b4f22ed27391689b
* Add munmap and mremap to the set of os interfaces that can be overloadeddrh2013-03-25
| | | | | in os_unix.c. FossilOrigin-Name: 8776047bd776bbf266eb9c3b56683badb84ae73e
* Use mremap() on Linux.dan2013-03-25
| | | FossilOrigin-Name: 431aecc8600c29c203546e48d256510510238887
* Merge all recent trunk changes into the experimental-mmap branch.drh2013-03-25
|\ | | | | FossilOrigin-Name: a607d63f0b6a3d3785e9385187d3e6b92e14fc70
| * Many spelling fixes in comments. No changes to code.mistachkin2013-03-21
| | | | | | FossilOrigin-Name: 6f6e2d50941e444ebc83604daddcc034137a05b7
* | Add a test that simulates an error in mmap().dan2013-03-25
| | | | | | FossilOrigin-Name: 6ec7367d8e98425f00eeb8215ca8964313c1d0b7
* | Change the signature of the xUnfetch method to "int ↵dan2013-03-25
| | | | | | | | | | (*xUnfetch)(sqlite3_file*, sqlite3_int64 iOfst, void *p)". FossilOrigin-Name: 115b830509e8f0aa9d5965c1e9cd4f2ed9d01938
* | Remove unnecessary code to round the size of a memory mapping to 4KB from ↵dan2013-03-25
| | | | | | | | | | os_unix.c. Rename SQLITE_IOERR_MREMAP to SQLITE_IOERR_MMAP. Fix other small issues in os_unix.c. FossilOrigin-Name: dce35c01a5fe66d2970075b1e3f0376026485e4c
* | Fix a case in the pager where an xFetch() reference was being leaked ↵dan2013-03-25
| | | | | | | | | | following an OOM error. FossilOrigin-Name: 5885ba6ce768658ec25b60747430d147b315b55c
* | Replace the sqlite3_io_methods.xMremap interface with ↵dan2013-03-23
| | | | | | | | | | sqlite3_io_methods.xFetch and xUnfetch. FossilOrigin-Name: 1431be95579160fb70408d43e17fc23c7b69ab4a
* | Add a fix for the assert() statements added by the previous commit.dan2013-03-22
| | | | | | FossilOrigin-Name: 19345416ed5e1ab5b0b35993b0b9069c2fb1683b
* | Add assert statements to os_unix.c to ensure that any mapped region of the ↵dan2013-03-22
| | | | | | | | | | database file is not being read or written using the xRead() or xWrite() methods. FossilOrigin-Name: 765615f9fba7c1765eb741cb98a09a28b464ee55
* | Do not use the Linux mremap() call. Use the same strategy for xMremap() as ↵dan2013-03-21
| | | | | | | | | | on OSX instead. FossilOrigin-Name: 5ed8ad780c991d2ca44003ee84350fb5e95ad58e
* | Optimize the xMremap method in os_unix.c some.dan2013-03-20
| | | | | | FossilOrigin-Name: 9529ed88a71fee02fae72dc86f0669bd6856ff92
* | When possible, use memory mapping when appending new pages to a database file.dan2013-03-20
| | | | | | FossilOrigin-Name: 14135da3cdbafd699563a29608f32347cda28338
* | Add the sqlite3_io_methods.xMremap() method to the VFS interface. Also ↵dan2013-03-19
| | | | | | | | | | "PRAGMA mmap_size". FossilOrigin-Name: 6183f1bd86ceed76d22d9762f3d7eb33262c62d1
* | Use mmap() to read from the database file in rollback mode. This branch is ↵dan2013-03-14
|/ | | | | unix only for now. FossilOrigin-Name: 6f21d9cbf5d457e63a7282015a89ae785526cf6d
* Fix an operator precedence problem on the [1d8086902e] check-in.drh2013-03-06
| | | FossilOrigin-Name: 4f5f3aebe81c3cbe539db3e33ec38fa3de47e90b
* Do not attempt to set the permissions on an existing journal or wal file. Do ↵dan2013-03-05
| | | | | this only immediately after creating a new file (or opening one zero bytes in size). FossilOrigin-Name: 1d8086902ee96347491bce5ec04dc92ccd42efa1
* Always use strncmp() rather than memcmp() when comparing strings where onedrh2013-03-01
| | | | | | | or other string might be less than the length parameter, since optimized versions of memcmp() might read past the first difference and in so doing generate an access violation. FossilOrigin-Name: d73435587ba7459e2e2c32980d0e17abdeceb4bc
* Do not use umask() since it change the umask for the entire process, not justdrh2013-01-04
| | | | | | the thread using SQLite. Make whatever permission changes are needed using fchmod() after the file is created, instead. FossilOrigin-Name: 6c4c2b7dbadedac384d380efd54f12f6ccbf4ca9
* Add the SQLITE_FCNTL_TEMPFILENAME file control that asks the underlying VFSdrh2012-12-06
| | | | | to return a new temporary filename. Per request from NSS team at Mozilla. FossilOrigin-Name: 1a63b1d5fa5d79f96eddbda6d94bc10248863710
* Use preprocessor macros to automatically detect whether or notdrh2012-11-13
| | | | | | posix_allocate() is available. (It is generally available on Linux but not on Mac.) Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3] FossilOrigin-Name: 597333f1024092b94bcd8772541e19a0f707bd40
* When available, use posix_fallocate() rather than ftruncate() to allocatedrh2012-11-13
| | | | | | | | space for mmap()ed -shm files, since posix_fallocate() gives an error if no disk space is available whereas ftruncate() is silent and leaves the system vulnerable to a SIGBUS upon first write to the mmap()ed region. Ticket [5eaa61ea1881040b17449ca043b6f8fd9ca55dc3] FossilOrigin-Name: 356259617cfad04492a02912fdf781f54a2b4494
* Only log unlink() errors if the error is something other thandrh2012-11-09
| | | | | | SQLITE_IOERR_DELETE_NOENT. The error is still reported up the stack, it is simply not added to the sqlite3_log(). FossilOrigin-Name: 5a3b07f0f5dfae7eea870303f52f37d6a17f1da2
* Change os_unix.c to propagate ENOENT errors back to sqlite as ↵dan2012-11-09
| | | | | SQLITE_IOERR_DELETE_NOENT. Have SQLite ignore these where they are benign and propagate them back to the caller where they may indicate a file-system malfunction of some description. FossilOrigin-Name: bed9c172ce624ab7b5b9de9ad42444891717ad9a
* Add QNX-specific performance tweaks to the unix VFS. (Cherry-pick merge ofdrh2012-10-26
| | | | | [b02849e7bde458].) FossilOrigin-Name: 63a7dd75e61afb3d05a1434f66ad6a5f08352aad
* Attempt to suppress warnings generated by Coverity.drh2012-10-09
| | | FossilOrigin-Name: 7b1a6e6cb5099076bf19db142b17c99044a869cd