/ File History
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

History of src/malloc.c

2019-10-09
17:06
An alternative, experimental lookaside memory allocator that uses two different slot sizes. file: [7b36b39a] check-in: [5ba8cee8] user: sperry branch: 2-size-lookaside, size: 20003
2019-10-05
14:39
Performance optimization to the lookaside-memory disabling mechanism. file: [b7640bcf] check-in: [17ce1c49] user: drh branch: trunk, size: 20702
2019-04-25
18:15
Add the sqlite3_hard_heap_limit64() interface and the corresponding "PRAGMA hard_heap_limit=N" command. file: [224052e6] check-in: [b0ccef61] user: drh branch: hard-heap-limit, size: 22278
2019-02-08
14:55
Give the sqlite3 object a pointer to the current Parse so that if an OOM occurs, it can automatically set the Parse.rc value to SQLITE_NOMEM. This avoids a frequent extra test of db.mallocFailed in the innermost parser loop. file: [0f9da2a6] check-in: [5c663804] user: drh branch: trunk, size: 20747
2018-01-10
13:58
Tag an unreachable branch using ALWAYS(). file: [07295435] check-in: [c42c734f] user: drh branch: trunk, size: 20677
2017-12-27
19:43
Add and use the internal sqlite3DbSpanDup() interface. file: [6f684fd0] check-in: [a8e1545c] user: drh branch: span-refactor, size: 20669
2017-08-29
20:21
Faster memory allocation from lookaside by not trying to keep track of the number of outstanding allocations, and rather computing that value only when requested. file: [a02c9e69] check-in: [a06263f1] user: drh branch: trunk, size: 20206
2017-08-28
15:51
Remove the rarely-used scratch memory allocator. This makes the code smaller, faster, and easier to maintain. In place of the scratch allocator, add the SQLITE_CONFIG_SMALL_MALLOC configuration option that provides a hint to SQLite that large memory allocations should be avoided. file: [e069cec0] check-in: [54b00024] user: drh branch: trunk, size: 20223
2017-08-27
10:55
Instrumentation and changes in an effort to reduce thread contention. file: [6bd9604e] check-in: [c93298d5] user: drh branch: reduced-thread-contention, size: 25188
2017-04-05
12:39
Split off sqlite3DbFreeNN() from sqlite3DbFree() and use it in cases where we know that the argument to be freed is never NULL. file: [e20bb2b4] check-in: [ad90e8bb] user: drh branch: trunk, size: 24923
2017-03-10
17:03
Fix an error in the SQLITE_MAX_MEMORY implementation resulting from a bad merge. Update the OSSFuzz interface so that it times out after running the byte-code engine for 10 seconds. file: [89c98e36] check-in: [f8560c60] user: drh branch: trunk, size: 24671
16:22
Add the -DSQLITE_MAX_MEMORY=N compile-time option. The default is no limit. file: [e2b75576] check-in: [eabd4ef4] user: drh branch: trunk, size: 24660
15:55
Add the SQLITE_MAX_MEMORY compile-time option that provides a hard upper bound on the amount of memory that SQLite will use, per process. file: [96f86a14] check-in: [77dfe2ab] user: drh branch: max-memory-option, size: 24651
2017-02-13
13:35
Change all legacy instances of "#if SQLITE_DEBUG" to "#ifdef SQLITE_DEBUG" for consistency. file: [d0a14742] check-in: [670f10b2] user: drh branch: trunk, size: 24530
2017-02-08
18:13
Typo fixes in comment. No changes to code. file: [f345c60d] check-in: [c09dd5c0] user: mistachkin branch: trunk, size: 24524
16:01
Always invoke the xRoundup() method of the memory allocator before calling xMalloc(). file: [dc2b84cd] check-in: [77b470b0] user: drh branch: trunk, size: 24526
2017-01-13
12:53
Fix the build for SQLITE_ENABLE_MEMORY_MANAGEMENT. file: [fc1b9f44] check-in: [8c85b8fd] user: drh branch: trunk, size: 24174
2017-01-10
16:09
Avoid unnecessary calls to the xRoundup() method of the memory allocator when the soft heap limit is not set. file: [c36ef8fa] check-in: [4209b89e] user: drh branch: trunk, size: 24165
2017-01-03
18:05
Use the GCC built-in __sync_fetch_and_sub() to make the sqlite3StatusDown() routine atomic, and thereby avoid some mutexing. file: [254c1cf3] check-in: [f69ce75b] user: drh branch: gnu-safe-math, size: 24355
2016-12-27
12:08
Avoid a potential (harmless) signed integer overflow in memory usage accounting when calling sqlite3_realloc() to reduce the size of an allocation. file: [f3fad34c] check-in: [2d71cbdf] user: drh branch: trunk, size: 24191
2016-10-17
00:48
Small size reduction and performance increase in the string duplicator. file: [5ee7c2d3] check-in: [cda998f0] user: drh branch: trunk, size: 24180
2016-08-04
14:08
Add extra logging calls to this branch. file: [218f1578] check-in: [491f1ef3] user: dan branch: debug, size: 24283
2016-02-13
23:43
Enhance ability to debug out-of-memory errors. file: [1443d1ad] check-in: [6a9c4a3e] user: mistachkin branch: noMemBkpt, size: 24225
2016-02-06
19:48
Make sure variable declarations occur at the beginning of blocks, even with SQLITE_DEBUG enabled. file: [337e9808] check-in: [2f7778e6] user: drh branch: trunk, size: 24220
2016-02-05
13:38
Add the slightly faster sqlite3DbMallocRawNN(db,n) routine for the majority cases where db is guaranteed to be not NULL. file: [55ebb170] check-in: [0a802e96] user: drh branch: oom-handling, size: 24125
02:42
Further performance improvements that fall out of the mallocFailed changes. file: [92ca6e16] check-in: [d94416dd] user: drh branch: oom-handling, size: 23785
01:55
Improvements to the way that OOM errors are processed. file: [65168ef9] check-in: [c3ef0347] user: drh branch: oom-handling, size: 23548
2016-01-20
03:36
Performance improvement in sqlite3DbMallocRaw(). file: [b67c26c3] check-in: [ff8eadbe] user: drh branch: trunk, size: 22649
2015-12-10
15:09
Move pointer range comparisons into a macro, where they can be dealt with in a more portable way. file: [8f787669] check-in: [ad3124c8] user: drh branch: stdint.h, size: 22447
2015-10-26
12:55
Remove an unreachable branch in malloc.c. file: [337bbe9c] check-in: [a36b7fe9] user: drh branch: trunk, size: 22425
2015-10-15
17:21
Remove a superfluous conditional from the memory allocation initialization. file: [0a2e42b8] check-in: [9ccf8f8d] user: drh branch: trunk, size: 22433
16:20
Performance optimizations to the sqlite3MallocSize() by requiring the argument to always be non-NULL. file: [3eb27dfe] check-in: [cb65989b] user: drh branch: trunk, size: 22479
15:28
Change sqlite3StatusSet() into sqlite3StatusHighwater() so that only the highwater mark is recorded. This gives a small size reduction and performance improvement. file: [f2daeddf] check-in: [6422d223] user: drh branch: trunk, size: 22461
2015-09-25
16:29
Disable the SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS mechanism and replace it with SQLITE_TESTCTRL_BENIGN_MALLOC_CTRL, which gives better control. file: [76c62c8e] check-in: [2c57b2f3] user: drh branch: malloc-testing, size: 22480
2015-09-10
01:22
No-op the sqlite3_memory_alarm() interface in a different way, that does not break legacy memory behavior. This is a re-do of check-in [5d3f5df4da9f40d5]. file: [3a37ce69] check-in: [8250e2a4] user: drh branch: trunk, size: 22443
2015-09-02
14:56
The sqlite3_memory_alarm() interface has been deprecated and undocumented for almost 8 years (since version 3.5.3). Change it into a no-op. file: [021012e2] check-in: [5d3f5df4] user: drh branch: trunk, size: 22838
2015-09-01
20:09
Small size reduction and performance increase in sqlite3DbMallocSize(). file: [7de3bb83] check-in: [8a80967f] user: drh branch: trunk, size: 23663
2015-07-04
18:15
Preserve the number of requested PAGECACHE pages even if the memory pointer or size is zero. Enhance the pcache1.c header comment to explain the memory layout of a page cache line. file: [19461e15] check-in: [dacb2a61] user: drh branch: trunk, size: 23663
2015-06-30
03:13
Change sqlite3ApiExit() so that its first argument is never NULL. file: [9be4e645] check-in: [791b706e] user: drh branch: trunk, size: 23697
2015-05-15
04:13
Simplifications to error message processing. Fix a possible problem in error message formatting when vacuuming a database with a corrupt schema. file: [908c780f] check-in: [56ef98a0] user: drh branch: trunk, size: 23792
2015-05-10
02:01
Fix the sqlite3_memory_used() and sqlite3_memory_highwater() interfaces so that they really do provide a 64-bit answer. file: [5bc15d52] check-in: [8a0d5d5e] user: drh branch: trunk, size: 23984
2015-03-26
17:04
Avoid leaving the malloc subsystem in a partially initialized state if the low-level initialization callback fails. file: [6a370b83] check-in: [3e872011] user: drh branch: trunk, size: 24148
2015-03-23
17:25
Add the sqlite3_status64() interface. Make the new interface and the legacy sqlite3_status() both atomic and threadsafe. Check threadsafety using assert()s. file: [e818a0db] check-in: [1ce8e8fa] user: drh branch: status64, size: 24073
2015-03-21
23:38
Fix harmless compiler warnings with MSVC when assert() and SQLITE_MEMDEBUG are both enabled. file: [13f3f1cd] check-in: [9513dbd4] user: mistachkin branch: trunk, size: 23922
2014-11-04
14:22
Change the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch buffer is used per thread. Use the generic heap memory allocator for the WalIterator object when running a checkpoint. file: [740db543] check-in: [391c9b85] user: drh branch: trunk, size: 23890
2014-10-24
00:35
Add the SQLITE_ENABLE_API_ARMOR compile-time option. This is a work in progress and is not yet completely functional. file: [5e02eab3] check-in: [c297a84b] user: drh branch: api-armor, size: 24079
2014-10-07
15:46
Enhance (and fix) the MEMTYPE tags associated with heap memory allocations when SQLITE_MEMDEBUG is used. file: [3c3ac679] check-in: [ca5b789e] user: drh branch: trunk, size: 23964
2014-10-03
14:54
Update to requirements marks related to changes in the memory allocation interface and enhancement of the documentation regarding DEFAULT clauses in CREATE TABLE. file: [7cf86b4f] check-in: [440705b9] user: drh branch: trunk, size: 23885
2014-09-18
21:25
Add the Mem.szMalloc element to the Mem object and use it to keep track of the size of the Mem.zMalloc allocation. file: [5bb99ee1] check-in: [9c09ac35] user: drh branch: trunk, size: 23859
02:20
Fix harmless warnings on 32-bit MSVC builds. file: [4c1d5111] check-in: [5192f964] user: drh branch: trunk, size: 23799
01:21
Fix compiler warnings and change the nullMem structure initializer into a format that MSVC can understand. file: [c6dc1e15] check-in: [163bfae8] user: drh branch: micro-optimizations, size: 23775
2014-09-09
17:27
Add new APIs that take 64-bit length parameters: sqlite3_malloc64(), sqlite3_realloc64(), sqlite3_bind_blob64(), sqlite3_bind_texte64(), sqlite3_result_blob64(), and sqlite3_result_texte64(). Internal memory allocation routines also now use 64-bit unsigned length parameters for safety. Also add the sqlite3_msize() interface. Fix the sqlite3_get_table() to use sqlite3_realloc64() to avoid a integer overflow problem. file: [cc015821] check-in: [94954850] user: drh branch: 64-bit-lengths, size: 23758
2014-08-23
20:25
Faster implementation of the sqlite3ApiExit() routine. file: [954de5f9] check-in: [bd41d394] user: drh branch: trunk, size: 23353
19:42
Another memory allocator performance optimization. file: [06f85078] check-in: [6da6f46d] user: drh branch: trunk, size: 23191
19:04
Changes to sqlite3ScratchMalloc() that make the entire memory allocation interface a little faster and about 100 bytes smaller. file: [7f26fced] check-in: [f83daa16] user: drh branch: trunk, size: 22999
2014-08-22
18:00
Split the sqlite3Error() routine into sqlite3Error() and sqlite3ErrorWithMsg(), for a slight size reduction and performance increase. file: [0a88a97f] check-in: [cf561d1f] user: drh branch: trunk, size: 23066
2014-05-19
19:26
Fix harmless compiler warnings in MSVC. file: [35ee353f] check-in: [aa7e2041] user: drh branch: safer-malloc, size: 23038
15:16
Changes to help ensure that a multiplication does not overflow when computing the number of bytes needed for a memory allocation, and cause a malfunction. No problems existing problems were discovered. However, these changes should help to ensure that no problems arise in the future. file: [6a1fbdad] check-in: [17349a49] user: drh branch: safer-malloc, size: 23019
2013-12-10
19:49
Simplify and improve the performance of the sqlite3VdbeMemGrow() routine. file: [0203ebce] check-in: [48ecf187] user: drh branch: trunk, size: 23069
2013-09-13
16:36
Change the PRAGMA parser to use a binary search for the pragma name. Also: Minor performance enhancement to sqlite3DbFree() and to the token dequoter. file: [543a8eb5] check-in: [870c030b] user: drh branch: trunk, size: 23070
2012-07-19
20:27
Further tweaks to malloc paths. file: [57121e3e] check-in: [0a334441] user: dan branch: calloc, size: 24868
2012-07-18
16:07
Remove another branch from the DbMalloc() paths. file: [9321b18a] check-in: [defd828e] user: dan branch: calloc, size: 24539
11:28
Reorganize code to remove a few of the branches introduced into the critical sqlite3DbMallocXXX() path by the previous commit. file: [1deb02c0] check-in: [75c095ee] user: dan branch: calloc, size: 24363
2012-07-17
19:32
Enhance the custom memory allocation interface to allow the user to specify a calloc() function. file: [e80dccc5] check-in: [8752237d] user: dan branch: calloc, size: 23832
2012-05-21
16:59
Make sure lookaside memory allocations are unusable after they are freed. file: [fe085aa8] check-in: [3869aef6] user: drh branch: trunk, size: 23049
2011-12-22
18:44
Backport the fixes for Coverity-discovered problems in [1c27d84216], [676acce274], and [f9c4a7c8f4] from trunk to the 3.7.6 branch. file: [758b53e4] check-in: [a61786e7] user: drh branch: branch-3.7.6, size: 22902
17:10
Check the return code from sqlite3_initialize() called from within sqlite3_soft_heap_limit64() and return an error from sqlite3_soft_heap_limit64() if sqlite3_initialize() fails. file: [15afac5e] check-in: [676acce2] user: drh branch: trunk, size: 22928
2011-05-05
17:00
Fix a bug in memory usage tracking that was introduced by check-in [4e33a0eaf83922]. file: [591aedb2] check-in: [8ba456ae] user: drh branch: trunk, size: 22897
2011-04-15
19:30
Remove stray semi-colon that MSVC complained about. file: [74c740e8] check-in: [7a085271] user: shaneh branch: trunk, size: 22897
16:39
Changes to memory allocator usage tracking to delay the onset of integer overflow. file: [d9cdb1fc] check-in: [4e33a0ea] user: drh branch: trunk, size: 22898
2011-04-05
22:08
Suppress many harmless compiler warnings, mostly signed/unsigned comparisons within asserts or unused parameters in extensions. file: [788f2ed9] check-in: [3eeb0ff7] user: drh branch: trunk, size: 22871
2010-12-20
15:51
Add additional DBSTATUS options for measuring the hit and miss rates against the lookaside memory pool - information useful in tuning the lookaside size. Currently experimental pending analysis of performance impact. file: [92d59a00] check-in: [34613f1d] user: drh branch: experimental, size: 22864
2010-10-04
14:11
Warning cleanup from MSVC. file: [3d7284cd] check-in: [cde62657] user: shaneh branch: trunk, size: 22710
2010-09-28
14:26
Fix several harmless compiler warnings. file: [455f9d67] check-in: [7be03ecc] user: drh branch: trunk, size: 22703
2010-09-15
17:54
Added the sqlite3_soft_heap_limit64() interface. Deprecate the older sqlite3_soft_heap_limit() interface. file: [babecbdf] check-in: [82268a2c] user: drh branch: trunk, size: 22700
2010-09-11
16:25
Fix a couple of incorrect evidence marks on malloc(). file: [579a6eee] check-in: [f9b5c5cb] user: drh branch: trunk, size: 22491
16:15
Additional evidence marks on the malloc() implementation. Update the documentation to explain that mallocs are not necessarily 8-byte aligned if the SQLITE_4_BYTE_ALIGNED_MALLOC compile-time option is used. file: [44a50eb1] check-in: [42b4bf9e] user: drh branch: trunk, size: 22491
15:54
Add assert() statements to demonstrate that memory allocations are always aligned to an 8-byte boundary (unless SQLITE_4_BYTE_ALIGNED_MALLOC is defined). file: [ab48f494] check-in: [305cc4e6] user: drh branch: trunk, size: 22370
2010-09-02
18:13
Fix an off-by-one error in the scratch memory allocator. file: [e0e9ca16] check-in: [5a959160] user: drh branch: trunk, size: 22242
17:15
Use sqlite3_mutex_notheld() instead of !sqlite3_mutex_held() inside of assert() statements since the former works when mutexing is disabled while the latter does not. file: [2231edbd] check-in: [2211486b] user: drh branch: trunk, size: 22243
10:08
If MEM_STATUS is disabled, avoid holding the STATIC_MEM mutex when calling the user-defined xMalloc method. Holding the mutex causes problems for memsys3 and memsys5. file: [8b67cb6b] check-in: [4f20f8ba] user: dan branch: trunk, size: 22241
2010-08-31
15:27
Add evidence mark comments to source code. Add additional information to the documentation of sqlite3_release_memory(). Fix a minor inefficiency in mem1.c that was discovered while writing requirements tests. file: [d9fcf07f] check-in: [53b0c03f] user: drh branch: trunk, size: 22115
2010-08-27
17:16
Refactor the implementation of the scratch memory allocator. Add the SQLITE_TESTCTRL_SCRATCHMALLOC interface to facilitate testing. file: [f34c9253] check-in: [a3475ddf] user: drh branch: trunk, size: 21820
12:21
Remove unnecessary code from malloc.c. Enhance pcache1.c so that is tries to reuse existing pages, rather than create new pages, when SQLite is under memory pressure. "Memory pressure" means that SQLITE_CONFIG_PAGECACHE memory is nearly exhausted or sqlite3_soft_heap_limit() has been reached. file: [e81193f1] check-in: [51049479] user: drh branch: trunk, size: 21886
2010-07-26
19:09
Fix a bug in the SQLITE_STATUS_MALLOC_COUNT counter. Add an ALWAYS() around a condition in the SQLITE_DBSTATUS_SCHEMA_USED logic that is always true. file: [19a46846] check-in: [6df081ad] user: drh branch: trunk, size: 21724
18:43
Add the SQLITE_STATUS_MALLOC_COUNT option for sqlite3_status(). file: [52c19b9e] check-in: [8f8e442b] user: drh branch: trunk, size: 21666
14:47
Add virtual table test cases to dbstatus.test. file: [9d7dc6a5] check-in: [72b84d06] user: dan branch: experimental, size: 21559
11:07
Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() and all memory from sqlite3_malloc() is freed by sqlite3_free(). file: [1cf0f2f4] check-in: [629e38a8] user: drh branch: experimental, size: 21517
2010-07-25
02:39
Fixes to prior checkins so that they compile and run even if SQLITE_MEMDEBUG is not defined. file: [2e38fd5e] check-in: [548bf3f7] user: drh branch: malloc-enhancement, size: 28385
02:12
Further examples of using automatic deallocation to replace "delete" methods. file: [a7e805ed] check-in: [da2f62c5] user: drh branch: malloc-enhancement, size: 28304
2010-07-24
19:08
Additional malloc sanity changes. Use sqlite3MemLink() on Index.zColAff and Table.zColAff as a proof of concept. file: [4ab52050] check-in: [e5ecb159] user: drh branch: malloc-enhancement, size: 27753
18:25
Add infrastructure to support a hierarchy of memory allocations with automatic deallocation of substructure. file: [2dbc7365] check-in: [48ef221c] user: drh branch: malloc-enhancement, size: 27416
16:34
Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() and all memory from sqlite3_malloc() is freed by sqlite3_free(). file: [8394eba1] check-in: [ac1f37a6] user: drh branch: malloc-enhancement, size: 21367
11:28
Experimental code to measure memory consumed by database schemas and prepared statements. file: [d3211310] check-in: [9aa30342] user: dan branch: experimental, size: 21012
2010-07-23
17:32
Strenghten an assert() in malloc.c that helps to ensure that allocated memory is freed by the appropriate routine. file: [f8b9bcd1] check-in: [80db61ac] user: drh branch: trunk, size: 20833
2010-06-26
20:25
Fix two asserts on the scratch allocator to allow for up to two outstanding scratch allocations per thread. file: [09c3777b] check-in: [f149b498] user: drh branch: trunk, size: 20788
2010-03-12
16:32
Add assert()s to mem2.c (activated by SQLITE_MEMDEBUG) which verify that memory alloctions that might have come from lookaside are always freed using a lookaside-aware free routine. file: [a08f16d1] check-in: [c2af2164] user: drh branch: trunk, size: 20766
2009-11-10
01:30
Remove the obsolete "$Id:$" RCS identifier strings from the source code. file: [5fa17579] check-in: [f6c045f6] user: drh branch: trunk, size: 19921
2009-10-26
22:08
Remove some obsolete code within #if 0 that was causing developer concern. file: [685561d2] check-in: [1d64e945] user: drh branch: trunk, size: 19978
2009-08-18
14:48
Fix obscure issues with the memsys5 memory allocator. Arrange that the xRealloc() interface to memory allocators is only called with a value that has been through xRoundup(). file: [b1725183] check-in: [577bd6f1] user: drh branch: trunk, size: 20030
2009-08-17
13:42
Enhanced documentation and minor code tweaks in preparation for hardening the sqlite3_initialize/shutdown interfaces against initialization failures. file: [ae9fef00] check-in: [98c49e61] user: drh branch: trunk, size: 20075
2009-07-17
11:44
Code simplifications in support of structural testing. (CVS 6900) file: [561710bf] check-in: [fb1b955d] user: drh branch: trunk, size: 20039
2009-07-16
18:21
Code simplifications and comment improvements in support of structural coverage testing. (CVS 6899) file: [70d22628] check-in: [94525179] user: drh branch: trunk, size: 20073
2009-06-27
00:48
Fix a bug in sqlite3_realloc() - if called with a size of more than 2147483392 it returns 0 but it also releases the prior allocation. (CVS 6827) file: [16907f3b] check-in: [653df0af] user: drh branch: trunk, size: 20147
2009-06-26
18:35
Remove incorrect NEVER() macros from malloc.c. The allocations can be exceeded using sqlite3_malloc() and sqlite3_realloc(). (CVS 6826) file: [55c4e997] check-in: [0d345e59] user: drh branch: trunk, size: 20123
2009-05-03
20:23
Changes to facility full coverage testing of util.c. (CVS 6597) file: [7b3b6423] check-in: [a6122990] user: drh branch: trunk, size: 20337
2009-03-24
15:08
Changes to insure that lookaside memory allocations are never used to hold schema content. Ticket #3743. (CVS 6377) file: [a1f0f8ae] check-in: [ea74d8dc] user: drh branch: trunk, size: 20365
2009-03-23
17:49
Add asserts to make sure that database connection locks are held when accessing the lookaside memory allocation buffers. No defects were found. (CVS 6374) file: [1d862da7] check-in: [8a9f3e66] user: drh branch: trunk, size: 20339
04:33
Use the ROUND8() macro to round an integer up to the nearest multiple of 8 and ROUNDDOWN8() macro to round down to the nearest multiple of 8. This is a cosmetic change. (CVS 6372) file: [1a52c55b] check-in: [db1d4d2f] user: danielk1977 branch: trunk, size: 20155
2009-03-05
04:20
Corrected typos and misspellings. Ticket #3702. (CVS 6336) file: [b9c59b33] check-in: [6404afa0] user: shane branch: trunk, size: 20139
2009-02-19
20:50
Remove code in malloc.c that was already commented out using #if 0. (CVS 6306) file: [072ddad9] check-in: [e1ad757e] user: drh branch: trunk, size: 20135
2009-02-17
18:37
Add tests to double-check that nothing within SQLite ever tries to allocate amounts of memory that are close to the maximum signed integer, leading to an integer overflow within malloc(). This is not currently a problem. The extra tests just insure it never becomes a problem. (CVS 6298) file: [552d993e] check-in: [f6ba7bb9] user: drh branch: trunk, size: 23130
16:29
Allow sqlite3_shutdown() to be called by a process before sqlite3_initialize() is. Prior to this commit such a call could segfault. (CVS 6296) file: [836bc7ea] check-in: [79431c58] user: danielk1977 branch: trunk, size: 22430
2009-01-20
16:53
When not compiling for an EBCDIC system, use built-in alternatives to the tolowe r(), toupper() and other ctype.h library functions. Ticket #3597. (CVS 6196) file: [bc408056] check-in: [1041abd6] user: danielk1977 branch: trunk, size: 22383
2008-12-16
17:20
Fix a compile error in an assert() and a warning with MSVC builds. (CVS 6032) file: [e2b4e6d7] check-in: [8b8f6a6a] user: shane branch: trunk, size: 22396
13:46
Make sure the memory returned from sqlite3ScratchMalloc() is 8-byte aligned. Ticket #3542. (CVS 6031) file: [a0bd0c11] check-in: [13b56b7f] user: drh branch: trunk, size: 22391
2008-12-10
21:19
Additional work at eliminating silly compiler warnings. (CVS 6010) file: [1e5eeb5a] check-in: [ea01d437] user: drh branch: trunk, size: 22306
19:26
Never use strlen(). Use our own internal sqlite3Strlen30() which is guaranteed to never overflow an integer. Additional explicit casts to avoid nuisance warning messages. (CVS 6007) file: [6a5b9115] check-in: [c872d554] user: drh branch: trunk, size: 22289
2008-12-05
15:24
Make use of sqlite3DbMallocSize to maximize the size of growable buffers after each reallocation. Added new comments and testcase() macros to where.c. (CVS 5981) file: [89c7c58f] check-in: [46f2d089] user: drh branch: trunk, size: 22250
2008-11-19
09:05
Changes to avoid "unused parameter" compiler warnings. (CVS 5921) file: [4e7bf5a3] check-in: [88134322] user: danielk1977 branch: trunk, size: 22224
2008-11-18
07:27
Reduce the number of "missing initializer" warnings. (CVS 5915) file: [00532787] check-in: [d68e2795] user: danielk1977 branch: trunk, size: 22158
2008-11-17
19:18
Modifications to avoid unsigned/signed comparisons in various files. (CVS 5914) file: [4a12eb37] check-in: [8009220c] user: danielk1977 branch: trunk, size: 22134
2008-10-12
00:27
Added SQLITE_OMIT_DEPRECATED compile time option to leave out deprecated functions. Updated test scripts to skip tests of deprecated functions if they are compiled out. (CVS 5808) file: [a213fb46] check-in: [ba3711ac] user: shane branch: trunk, size: 22123
2008-10-11
17:35
Fix to sqlite3DbMallocRaw() when SQLITE_OMIT_LOOKASIDE is defined so that once it fails it continues to fail. Add a comment explaining why this is important. (CVS 5804) file: [08f39c0f] check-in: [63dd8be7] user: drh branch: trunk, size: 22083
15:38
Added an assert() to detect lookaside memory leaks. Also added the SQLITE_OMIT_LOOKASIDE compile-time option which is useful in trying to track down lookaside memory leaks. (CVS 5800) file: [20613ebf] check-in: [0c4c6607] user: drh branch: trunk, size: 21393
2008-09-23
16:41
Always transform error code SQLITE_IOERR_NOMEM to SQLITE_NOMEM before returning. This was already happening in most places. (CVS 5738) file: [31f4ca21] check-in: [046ef072] user: danielk1977 branch: trunk, size: 21294
2008-09-04
04:32
Modified core to not call deprecated functions sqlite3_memory_alarm() and sqlite3_transfer_bindings() by adding sqlite3MemoryAlarm() and sqlite3TransferBindings(). sqlite3_memory_alarm() and sqlite3_transfer_bindings() are now simple wrappers for the new functions. In prep for adding SQLITE_OMIT_DEPRECATED. (CVS 5672) file: [6c3bcae8] check-in: [821c387d] user: shane branch: trunk, size: 21260
2008-09-02
17:52
Explicitly initialize at least the first field of every struct. This is to work around compilers that don't like the syntax "struct XXX { ... } yyy = {};". (CVS 5666) file: [9aa2ef80] check-in: [88bfdc87] user: danielk1977 branch: trunk, size: 20981
10:22
Change some more global variables to work with OMIT_WSD. (CVS 5660) file: [fb23bfbc] check-in: [46acaf58] user: danielk1977 branch: trunk, size: 20971
2008-09-01
18:34
Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652) file: [2ffd62fb] check-in: [573d92ab] user: danielk1977 branch: trunk, size: 20898
2008-08-29
17:56
Move a call to sqlite3_mutex_leave() to protect calls to sqlite3StatusAdd() related to scratch (SQLITE_CONFIG_SCRATCH) memory. (CVS 5641) file: [6bd94746] check-in: [4e011ddf] user: danielk1977 branch: trunk, size: 20436
2008-08-21
12:19
Fix the functionality associated with sqlite3_release_memory() and sqlite3_soft_heap_limit(). It is automatically disabled if the SQLITE_CONFIG_PAGECACHE option is used. (CVS 5576) file: [7ccc630b] check-in: [d025866b] user: danielk1977 branch: trunk, size: 20436
2008-08-20
14:49
Add the pcache module from the experimental branch. Also change things so that most of the built-in SQL functions are kept in single static hash-table, rather than creating and populating a separate hash table for each open database connection. (CVS 5566) file: [56918cdd] check-in: [cb494e10] user: danielk1977 branch: trunk, size: 20409
2008-08-05
17:53
Add SQLITE_STATUS_PAGECACHE_SIZE and SQLITE_STATUS_SCRATCH_SIZE. (CVS 5537) file: [22c68fc6] check-in: [c4e9b824] user: drh branch: trunk, size: 20388
2008-08-01
16:31
Test cases for sqlite3_db_config() and sqlite3_db_status(). (CVS 5518) file: [f0ad2800] check-in: [6a6b9430] user: drh branch: trunk, size: 20168
2008-07-31
17:16
Change the definition of SQLITE_CONFIG_PAGECACHE and SQLITE_CONFIG_SCRATCH to omit the magic "+4" in the buffer size calculation. (CVS 5512) file: [b1a337e2] check-in: [e7ed0fe6] user: drh branch: trunk, size: 20167
2008-07-29
14:29
Enhancements to the pagecache malloc test configuration. Changes to the speed test scripts to use the new test enhancements. (CVS 5494) file: [9359e52a] check-in: [0ce39c21] user: drh branch: trunk, size: 19976
2008-07-28
19:34
Implement the "lookaside" memory allocation cache. Use of this cache makes the speed1.test script run about 15% faster. Added new interfaces to control the cache. (CVS 5488) file: [2aa685ca] check-in: [e48f9697] user: drh branch: trunk, size: 19965
2008-07-18
18:56
Use the actual size of memory allocations to update the memory status counters. Fix the roundup() function of mem3 to be much closer to the actual allocation size. Ticket #3226. (CVS 5440) file: [c4b52589] check-in: [5c22132e] user: drh branch: trunk, size: 18787
2008-07-14
12:38
Fix a bug introduced by check-in (5406). Ticket #3216. (CVS 5407) file: [b9ff4e02] check-in: [518a24aa] user: drh branch: trunk, size: 18704
12:30
Work around a bug in Borland C. Ticket #3216. (CVS 5406) file: [3c11d9c2] check-in: [2c24e50d] user: drh branch: trunk, size: 18703
2008-07-08
19:34
Completely rework the sqlite3SetString() primitive so that it honors the SQLITE_LIMIT_LENGTH and avoids the use of strlen(). (CVS 5374) file: [226a532e] check-in: [8ed04b1e] user: drh branch: trunk, size: 18536
2008-06-23
14:03
Fix some codewarrior compilation problems. (CVS 5278) file: [f52166df] check-in: [e6ea8f87] user: danielk1977 branch: trunk, size: 19003
11:11
Correct comments above sqlite3_release_memory() and sqlite3_soft_heap_limit(). Ticket #3138. (CVS 5275) file: [a3c5f9bf] check-in: [32404468] user: danielk1977 branch: trunk, size: 18979
2008-06-21
08:12
Fix a problem in the test suite that could cause a crash if using a pre-allocated block of memory for pages (the problem was that sqlite3_shutdown() was being called while there were still open database connections). (CVS 5259) file: [d4339af3] check-in: [3d413e9b] user: danielk1977 branch: trunk, size: 18862
2008-06-19
18:17
Move the malloc() failure simulation out of malloc.c and into a separate sqlite3_mem_methods interface. Still some related changes to come. (CVS 5250) file: [66c0b17a] check-in: [d22cd2a5] user: danielk1977 branch: trunk, size: 18158
00:16
Add some test logic to the new memory allocation subsystem. (Lots more needed.) The test suite is currently indicating memory leaks, though it is unclear if this is a true code problem or just an instrumentation problem. (CVS 5240) file: [33b8a206] check-in: [cb1f11cd] user: drh branch: trunk, size: 18432
2008-06-18
18:12
Added support for scratch-memory lookaside allocations. Largely untested. Added calls to sqlite3_initialize() within malloc APIs. (CVS 5237) file: [56e48f81] check-in: [383a7860] user: drh branch: trunk, size: 15643
17:09
Implement the 'CONFIG_SINGLETHREAD' and 'CONFIG_MULTITHREAD' configuration modes. (CVS 5234) file: [6f84f295] check-in: [5059644c] user: danielk1977 branch: trunk, size: 13403
2008-06-17
15:12
Add internal interfaces: PageMalloc/PageFree and ScratchMalloc/ScratchFree. (CVS 5226) file: [7b622d22] check-in: [3e797d0f] user: drh branch: trunk, size: 13425
2008-06-15
02:51
Continuing work on the new memory allocation subsystem. Added routines for temporary memory allocation. Right the btree balance mechanism to only do one temporary allocation at a time. (CVS 5220) file: [c5bdf896] check-in: [65fe7b62] user: drh branch: trunk, size: 13216
2008-06-14
16:56
Continuing progress on the new memory allocation subsystem. Added the sqlite3_mem_methods structure for defining new memory allocators at run-time. (CVS 5219) file: [ed5c3658] check-in: [f00305f4] user: drh branch: trunk, size: 11791
2008-03-26
18:34
Changes to delay freeing buffers associated with vdbe memory cells until either sqlite3_finalize() or sqlite3_release_memory() is called. (CVS 4922) file: [12c1ae98] check-in: [8c2f6952] user: danielk1977 branch: trunk, size: 5871
2007-10-20
16:36
Add the new memory allocator to the amalgamation. Improvements to out-of-memory handling. (CVS 4498) file: [60e392a4] check-in: [b58c2b37] user: drh branch: trunk, size: 5800
2007-08-29
14:06
Use the DbMalloc() and DbRealloc() functions more consistently. (CVS 4323) file: [de4e77fe] check-in: [c790c234] user: danielk1977 branch: trunk, size: 5810
12:31
Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321) file: [baed31e1] check-in: [e38ef81b] user: danielk1977 branch: trunk, size: 5671
2007-08-24
03:51
The win32 driver compiles but does not yet work well. Many bugs fixed. (CVS 4282) file: [d4282f50] check-in: [3a68fcdd] user: drh branch: trunk, size: 5197
2007-08-22
20:18
The malloc.test script now passes all tests with no errors. (CVS 4271) file: [8078d4c3] check-in: [db818430] user: drh branch: trunk, size: 5207
00:39
Reenable the memory management logic. The quick.test script now runs with SQLITE_MEMDEBUG and SQLITE_ENABLE_MEMORY_MANAGEMENT. 7 minor errors. (CVS 4265) file: [f5ace943] check-in: [1914044b] user: drh branch: trunk, size: 5200
2007-08-21
19:33
The sqlite3_value object now carries an sqlite3* pointer to use for recording malloc failures. This eliminates the need to pass sqlite3* pointers into many internal interfaces. Also added more mutexing. (CVS 4263) file: [c291b07b] check-in: [92872761] user: drh branch: trunk, size: 5238
10:44
Remove unnecessary #includes of "os.h". New mutex implementations. (CVS 4255) file: [c2f5da62] check-in: [fbbd5bda] user: drh branch: trunk, size: 5326
2007-08-16
10:09
More work on refactoring of malloc() interfaces. There are still many errors. (CVS 4233) file: [613c65f1] check-in: [77b16713] user: danielk1977 branch: trunk, size: 5350
04:30
Half-way through a major refactoring of the memory allocation. I have not even attempted to compile so I am certain there are countless errors. (CVS 4231) file: [bec719bd] check-in: [deb7ecd6] user: drh branch: trunk, size: 4863
2007-08-08
01:04
Additional refinements on the amalgamation: Give a couple of constants file scope and add the SQLITE_API prefix to some interfaces that need it. Ticket #2554. (CVS 4199) file: [3850ab4a] check-in: [c09ec102] user: drh branch: trunk, size: 24424
2007-06-15
20:29
Make arrangements to optionally print a debug message at the point of a simulated malloc() failure when SQLITE_MEMDEBUG is defined. (CVS 4077) file: [fa9bbccc] check-in: [7d3c1f08] user: drh branch: trunk, size: 24428
2007-05-16
17:28
Change a few selected functions to macros to speed things up. (CVS 4015) file: [07790014] check-in: [93f811ec] user: danielk1977 branch: trunk, size: 24260
2007-05-05
11:48
Refactoring. Split btreeInt.h off from btree.c. Split malloc.c off from util.c. Expect much more to follow. (CVS 3925) file: [b89e3125] check-in: [16041116] user: drh branch: trunk, size: 24432 Added