SQLite

All files named ”src/mem1.c”
Login

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

History for src/mem1.c

2023-06-07
08:40
[3bb59158c3] part of check-in [26c1bb4bd9] Add a C-source spell-checking facility. make misspell (on Nix) (check-in: [26c1bb4bd9] user: larrybr branch: spell-check, size: 9097)
2020-07-29
16:18
[c5d2b974e3] part of check-in [a80ae2c98b] Dozens and dozens of typo fixes in comments. This change adds no value to the end product and is disruptive, so it is questionable whether or not it will ever land on trunk. (check-in: [a80ae2c98b] user: drh branch: typos, size: 9098)
2017-03-21
20:17
[c12a42539b] part of check-in [055b36f1c1] New simplified memory initialization for MacOS. (check-in: [055b36f1c1] user: drh branch: trunk, size: 9098)
2017-03-18
13:59
[79bf195f44] part of check-in [4e6a03d9e1] Only do the specialized MacOS single-core zone_malloc initialization if compiled with the SQLITE_MIGHT_BE_SINGLE_CORE flag. This avoids a (harmless) warning about OSAtomicCompareAndSwapPtrBarrier() being deprecated. (check-in: [4e6a03d9e1] user: drh branch: trunk, size: 9909)
2017-02-08
16:01
[fd7cd6fe21] part of check-in [77b470b0df] Always invoke the xRoundup() method of the memory allocator before calling xMalloc(). (check-in: [77b470b0df] user: drh branch: trunk, size: 9255)
12:18
[d5214ba7ca] part of check-in [c46e06fab4] Round up the size of all memory allocations to a multiple of 8 bytes when using the system memory allocator. (check-in: [c46e06fab4] user: drh branch: trunk, size: 9211)
2015-10-26
14:54
[6919bcf12f] part of check-in [138783b553] Fix a C99-ism and a harmless compiler warning. (check-in: [138783b553] user: drh branch: trunk, size: 9203)
2015-10-15
16:20
[52485a88f2] part of check-in [cb65989b07] Performance optimizations to the sqlite3MallocSize() by requiring the argument to always be non-NULL. (check-in: [cb65989b07] user: drh branch: trunk, size: 9180)
2015-01-10
16:49
[abe6ee469b] part of check-in [9e92a5ed5a] Improvements to compile-time-option hygiene. Use "#if OPTION" instead of "#ifdef OPTION" in cases where that makes sense, so that -DOPTION=0 will work. Add the "Have-Not" configuration in releasetest.tcl which disables all of the "HAVE_component" compile-time options. (check-in: [9e92a5ed5a] user: drh branch: trunk, size: 9198)
2014-09-06
16:39
[faf615aafd] part of check-in [e62aab5e92] Fix typos in comments. No code changes. (check-in: [e62aab5e92] user: peter.d.reid branch: trunk, size: 9212)
2013-11-12
21:37
[c0c990fcad] part of check-in [4e7e805e11] Adjust the SQLITE_MALLOCSIZE defines, primarily to make sure _msize gets used with MSVC when appropriate. (check-in: [4e7e805e11] user: mistachkin branch: trunk, size: 9213)
2012-08-20
15:53
[437c7c4af9] part of check-in [7edd10a960] Remove tab characters from source code files. Replace them with spaces. (check-in: [7edd10a960] user: drh branch: trunk, size: 8463)
2012-07-19
20:27
[7ed7d5cd9a] part of check-in [0a33444105] Further tweaks to malloc paths. (check-in: [0a33444105] user: dan branch: calloc, size: 8641)
2012-07-18
11:28
[5ac4fb90ad] part of check-in [75c095ee46] Reorganize code to remove a few of the branches introduced into the critical sqlite3DbMallocXXX() path by the previous commit. (check-in: [75c095ee46] user: dan branch: calloc, size: 9009)
2012-07-17
19:32
[bc33172c15] part of check-in [8752237d12] Enhance the custom memory allocation interface to allow the user to specify a calloc() function. (check-in: [8752237d12] user: dan branch: calloc, size: 8872)
2012-02-11
21:56
[b3677415e6] part of check-in [90e73dc368] Revise the preprocessor directives used to handle malloc.h and _msize, in order to detect and handle the MSVC special-case automatically. (check-in: [90e73dc368] user: mistachkin branch: trunk, size: 8466)
2012-02-08
12:13
[c953f3bfc8] part of check-in [16a471129d] Add an autoconf test for malloc.h and use the results of that test to conditionally #include the malloc.h header file. (check-in: [16a471129d] user: drh branch: trunk, size: 8790)
2012-01-18
18:22
[7e698fe336] part of check-in [bbaec351dd] Avoid overriding the malloc_usable_size symbol using the C preprocessor as this might be confusing the build on some systems. (check-in: [bbaec351dd] user: drh branch: trunk, size: 8673)
12:46
[3137fd0e24] part of check-in [238e35a441] Add the SQLITE_WITHOUT_MSIZE and SQLITE_WITHOUT_ZONEMALLOC macros in mem1.c to disable the use of _msize() on windows and the zone memory allocator on Apple products, respectively. (check-in: [238e35a441] user: drh branch: trunk, size: 8634)
2012-01-03
21:54
[ed2df8b167] part of check-in [8a048423f0] Pull all the latest trunk changes over into the apple-osx branch. (check-in: [8a048423f0] user: drh branch: apple-osx, size: 6544)
2011-12-10
13:49
[7998e7003a] part of check-in [256e27bd11] Always use _msize() to get memory allocation sizes on windows, without having to do anything special in the makefile. (check-in: [256e27bd11] user: drh branch: trunk, size: 6650)
2011-12-08
20:41
[f96706e354] part of check-in [0d955c20c0] Hand merge the zone allocator for MacOS from the apple-osx branch. (check-in: [0d955c20c0] user: drh branch: trunk, size: 6441)
2011-11-09
01:53
[7456e2ca05] part of check-in [2e8ab3cedf] For the mem1.c system malloc implementation, use the malloc_usable_size() function if the HAVE_MALLOC_USABLE_SIZE macro is defined. Update autoconf to look for that function when configuring. (check-in: [2e8ab3cedf] user: drh branch: experimental-pcache, size: 4659)
2011-10-10
23:53
[c390a8fce1] part of check-in [6cb43f6c6e] Forward port the Apple-specific changes from [db5b7b778c] in the apple-osx-377 branch. Fix this up so that it will compile and run on Linux. (check-in: [6cb43f6c6e] user: drh branch: apple-osx, size: 6334)
22:11
[1abe5a2c20] part of check-in [db5b7b778c] Merging in cherry picked diffs for persist wal, alloc padding, wal-safe vacuum and sqlite3_file_control based lockstate checking (check-in: [db5b7b778c] user: adam branch: apple-osx-377, size: 5657)
2010-11-19
23:50
[46095d62b2] part of check-in [c8bc057c7d] Merge all the latest changes from the trunk into the apple-osx branch. (check-in: [c8bc057c7d] user: drh branch: apple-osx, size: 5663)
2010-08-31
15:27
[00bd8265c8] part of check-in [53b0c03fd3] 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. (check-in: [53b0c03fd3] user: drh branch: trunk, size: 3951)
2010-06-16
19:48
[0f36f1eecd] part of check-in [21ca87f691] Merge in changes up to and including the 3.6.23.1 release. (check-in: [21ca87f691] user: drh branch: apple-osx, size: 5630)
2010-02-25
02:32
[07a57cbdff] part of check-in [46f406b202] Merge in all of the logging enhancements. This is a cherrypick merge of the following check-ins: [103321e37a], [a8076aede3], [6d910245ad], [7c4cca6d1a], [edea3bb740], [1a6d4bb130], [a8c984c1d6], [69a493182f], and [1168763d2c]. (check-in: [46f406b202] user: drh branch: branch-3.6.22, size: 3948)
2010-02-24
21:44
[89d4ea8d5c] part of check-in [1168763d2c] Add testcase() macros beside each sqlite3_log() call to make sure it is tested with both logging enable and disabled. (check-in: [1168763d2c] user: drh branch: trunk, size: 3918)
2010-02-23
20:11
[760dbac6ea] part of check-in [edea3bb740] Continuing improvements to error reporting and the sqlite3_log() routine. (check-in: [edea3bb740] user: drh branch: trunk, size: 3828)
2010-02-17
19:34
[f38d5dcc70] part of check-in [4b72e39bd0] Merge latest changes from the trunk into the apple-osx branch. (check-in: [4b72e39bd0] user: drh branch: apple-osx, size: 5330)
2010-02-16
22:06
[86f33483a3] part of check-in [c419955df0] Remove duplicated assignment in realloc. (check-in: [c419955df0] user: shaneh branch: trunk, size: 3618)
2009-12-07
23:53
[34cb5c25e4] part of check-in [ad08794d72] Merge all changes associated with the version 3.6.21 release into the OS-X branch. (check-in: [ad08794d72] user: drh branch: apple-osx, size: 5360)
2009-11-10
01:30
[552f7e1148] part of check-in [f6c045f649] Remove the obsolete "$Id:$" RCS identifier strings from the source code. (check-in: [f6c045f649] user: drh branch: trunk, size: 3648)
2009-11-03
22:34
[b46d8dab40] part of check-in [941a01eb86] Customizations for OSX contributed by Apple. (check-in: [941a01eb86] user: adam branch: apple-osx, size: 5423)
2009-03-23
04:33
[e6d5c23941] part of check-in [db1d4d2f50] 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) (check-in: [db1d4d2f50] user: danielk1977 branch: trunk, size: 3711)
2008-12-10
21:19
[3bfb39e4f6] part of check-in [ea01d43788] Additional work at eliminating silly compiler warnings. (CVS 6010) (check-in: [ea01d43788] user: drh branch: trunk, size: 3702)
2008-11-19
09:05
[bb8e26adde] part of check-in [88134322c3] Changes to avoid "unused parameter" compiler warnings. (CVS 5921) (check-in: [88134322c3] user: danielk1977 branch: trunk, size: 3705)
2008-10-28
18:58
[2091081d1c] part of check-in [4651f590f0] Remove the vestigial mem4 and mem6 memory allocators. Add the SQLITE_ZERO_MALLOC compile-time option and the mem0.c module to handle memory allocation for that case. (CVS 5848) (check-in: [4651f590f0] user: drh branch: trunk, size: 3639)
2008-09-01
18:34
[5a529ff121] part of check-in [573d92abb9] Begin adding support for the SQLITE_OMIT_WSD macro. Some (many) WSD variables still need wrappers added to them. (CVS 5652) (check-in: [573d92abb9] user: danielk1977 branch: trunk, size: 3738)
2008-07-25
08:49
[3a7fe31d82] part of check-in [43a4cae2ac] Updates to mem6.c allocator. (CVS 5473) (check-in: [43a4cae2ac] user: danielk1977 branch: trunk, size: 3732)
2008-07-24
08:20
[08f95af509] part of check-in [192bc19218] Add mem6.c, a new allocator. More to come. (CVS 5467) (check-in: [192bc19218] user: danielk1977 branch: trunk, size: 3726)
2008-06-23
15:10
[8340fa5f96] part of check-in [006fd69bf5] Handle a real system malloc() failure in mem1.c. (CVS 5281) (check-in: [006fd69bf5] user: danielk1977 branch: trunk, size: 3641)
14:40
[381aa49852] part of check-in [1de98da6b4] Remove a non-ansi construct from mem1.c - an assert() statement before the variable declarations in a function. (CVS 5280) (check-in: [1de98da6b4] user: danielk1977 branch: trunk, size: 3618)
2008-06-17
15:12
[159f10e280] part of check-in [3e797d0ffe] Add internal interfaces: PageMalloc/PageFree and ScratchMalloc/ScratchFree. (CVS 5226) (check-in: [3e797d0ffe] user: drh branch: trunk, size: 3610)
2008-06-15
02:51
[c8e07e9e66] part of check-in [65fe7b62cf] 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) (check-in: [65fe7b62cf] user: drh branch: trunk, size: 3654)
2008-06-14
16:56
[9ac005ab60] part of check-in [f00305f4cd] Continuing progress on the new memory allocation subsystem. Added the sqlite3_mem_methods structure for defining new memory allocators at run-time. (CVS 5219) (check-in: [f00305f4cd] user: drh branch: trunk, size: 3610)
2008-06-13
18:24
[18ca1e2543] part of check-in [a03c5af115] Progress toward implementation of sqlite3_config() and a rework of the mutex and memory allocation subsystems. This is an incremental check-in. (CVS 5218) (check-in: [a03c5af115] user: drh branch: trunk, size: 5371)
2008-03-18
00:07
[fc716ff521] part of check-in [d55a5e1c11] Add the ability to simulate out-of-memory errors when using the default memory allocator, mem1.c. Fix a bug that this enhancement revealed. (CVS 4875) (check-in: [d55a5e1c11] user: drh branch: trunk, size: 5265)
2008-02-14
23:26
[62a821702d] part of check-in [669ece8c82] Add the experimental mem5.c memory allocator. Allocate the content part of cache pages separately from the header. (See check-ins (4495) and (4409)). (CVS 4789) (check-in: [669ece8c82] user: drh branch: trunk, size: 5075)
2008-02-13
18:25
[b15e107d51] part of check-in [990237e27e] Where possible, avoid freeing buffers allocated for vdbe memory cells in case they can be reused. (CVS 4783) (check-in: [990237e27e] user: danielk1977 branch: trunk, size: 5695)
2007-11-29
18:36
[6d1a118649] part of check-in [cfd683ac80] Add the optional (and experimental) mmap() memory allocator in the mem4.c module. (CVS 4581) (check-in: [cfd683ac80] user: drh branch: trunk, size: 5525)
2007-11-05
17:54
[ad348eedd8] part of check-in [b57c89fed0] Drop support for the SQLITE_OMIT_MEMORY_ALLOCATION compile-time option. (CVS 4529) (check-in: [b57c89fed0] user: drh branch: trunk, size: 5483)
2007-10-19
17:47
[cacb202bc3] part of check-in [8487ca82fa] Added an experimental malloc-free memory allocation subsystem, intended for use on embedded systems. Runs 7% faster than when using system malloc() on Linux. (CVS 4493) (check-in: [8487ca82fa] user: drh branch: trunk, size: 5534)
2007-10-06
01:40
[232075b7da] part of check-in [7e9b886dab] Fix a memory leak in the sqlite3_realloc() implementation of the non-debugging memory allocator. (CVS 4475) (check-in: [7e9b886dab] user: drh branch: trunk, size: 5494)
2007-09-02
17:50
[1f85902b98] part of check-in [59e02db240] Fix function name typo in mem1.c. This bug managed to make it into the tree because the code in mem1.c is only compiled when the -DSQLITE_MEMDEBUG compile-time option is omitted. But pre-checkin tests usually include this option. Ticket #2612. (CVS 4368) (check-in: [59e02db240] user: drh branch: trunk, size: 5469)
2007-09-01
09:02
[9a939c061c] part of check-in [595bfe72f0] Fix a problem handling a malloc() failure in printf.c. Also some other things to improve test coverage. (CVS 4361) (check-in: [595bfe72f0] user: danielk1977 branch: trunk, size: 5484)
2007-08-24
03:51
[afe2fbf6d7] part of check-in [3a68fcddfa] The win32 driver compiles but does not yet work well. Many bugs fixed. (CVS 4282) (check-in: [3a68fcddfa] user: drh branch: trunk, size: 5643)
2007-08-22
20:18
[7b023d45dd] part of check-in [db818430e9] The malloc.test script now passes all tests with no errors. (CVS 4271) (check-in: [db818430e9] user: drh branch: trunk, size: 5844)
2007-08-17
15:53
[30bf8be384] part of check-in [af3e3c7acd] Begin migration to using sqlite3_vfs interface. (CVS 4240) (check-in: [af3e3c7acd] user: danielk1977 branch: trunk, size: 5833)
2007-08-16
19:40
[2c6a6e3b2c] part of check-in [160593dcc5] Change the design of the mutex interface to allow for both "fast" and "recursive" mutexes. (CVS 4238) (check-in: [160593dcc5] user: drh branch: trunk, size: 5823)
13:01
[08c4ee1639] part of check-in [3d60c14a32] Remove the thread specific data subsystem from the unix build. Remove legacy cruft from sqliteInt.h. Use the new mutex subsystem in the PRNG. (CVS 4237) (check-in: [3d60c14a32] user: drh branch: trunk, size: 5592)
2007-08-15
20:41
[6d4b9efe51] part of check-in [1dad2c0a1f] Enhancements and smoke testing of the new memory allocation subsystem. Have not yet cut it over to the core, though. (CVS 4230) (check-in: [1dad2c0a1f] user: drh branch: trunk, size: 5532)
17:07
[ef73642a17] part of check-in [8d2d1c4ff9] Add a debugging memory allocator. (CVS 4227) (check-in: [8d2d1c4ff9] user: drh branch: trunk, size: 5010)
13:04
Added: [f4127f6f6f] part of check-in [c0fa376979] Add initial implementations of mutex and memory subsystem modules. (CVS 4226) (check-in: [c0fa376979] user: drh branch: trunk, size: 4720)