SQLite

All files named ”src/mem2.c”
Login

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

History for src/mem2.c

2021-10-12
02:26
[c8bfc9446f] part of check-in [b54c0db0fd] Fix another harmless compiler warning for MSVC. (check-in: [b54c0db0fd] user: mistachkin branch: trunk, size: 14706)
02:17
[a6b4c1b29b] part of check-in [1ceb73f316] Fix harmless compiler warnings in the debug build for MSVC. (check-in: [1ceb73f316] user: mistachkin branch: trunk, size: 14700)
2020-07-16
14:52
[b93b8762ab] part of check-in [e3c423cb14] Modifications to test code so that the sqlite3MemdebugHastype() assert() statements are enabled for Tcl tests. (check-in: [e3c423cb14] user: dan branch: update-from, size: 14688)
2014-10-07
15:46
[f1940d9e91] part of check-in [ca5b789e33] Enhance (and fix) the MEMTYPE tags associated with heap memory allocations when SQLITE_MEMDEBUG is used. (check-in: [ca5b789e33] user: drh branch: trunk, size: 14700)
2013-08-31
05:13
[dce31758da] part of check-in [b48cfd2dfc] Fix harmless MSVC compiler warning with MEMDEBUG defined. (check-in: [b48cfd2dfc] user: mistachkin branch: cygwinTempPath, size: 14691)
2013-08-28
01:54
[e243acb034] part of check-in [8917e9f9a0] Fix several harmless compiler warnings. Fix a couple compiler issues with the shell. (check-in: [8917e9f9a0] user: mistachkin branch: mmapDisabled, size: 14684)
2010-08-31
15:27
[e307323e86] 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: 14649)
2010-08-20
09:53
[9e5f72e385] part of check-in [541dd3b870] Disable the MEMSYS2 auxiliary routines if MEMSYS2 is changed to an alternative memory allocator using SQLITE_CONFIG_MALLOC. (check-in: [541dd3b870] user: drh branch: trunk, size: 14593)
2010-07-26
11:07
[12c91260fd] part of check-in [629e38a8c9] Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() and all memory from sqlite3_malloc() is freed by sqlite3_free(). (check-in: [629e38a8c9] user: drh branch: experimental, size: 14440)
2010-07-25
02:39
[47361e1235] part of check-in [548bf3f7d7] Fixes to prior checkins so that they compile and run even if SQLITE_MEMDEBUG is not defined. (check-in: [548bf3f7d7] user: drh branch: malloc-enhancement, size: 14441)
2010-07-24
16:34
[716e62689d] part of check-in [ac1f37a647] Make sure all memory from sqlite3DbMalloc() is freed by sqlite3DbFree() and all memory from sqlite3_malloc() is freed by sqlite3_free(). (check-in: [ac1f37a647] user: drh branch: malloc-enhancement, size: 13839)
2010-03-12
16:32
[2ee7bdacda] part of check-in [c2af2164cf] 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. (check-in: [c2af2164cf] user: drh branch: trunk, size: 14094)
2010-03-08
15:17
[ee75229765] part of check-in [1a88e31b03] Correct an assert() in mem2.c (test code only). (check-in: [1a88e31b03] user: dan branch: trunk, size: 12902)
2010-01-05
03:30
[92b4f772b1] part of check-in [6462817b2f] In the debugging memory allocator, initialize new memory allocations to pseudo-randomness in an effort to find problems with memcmp() of structures that have uninitialized pad bytes. (check-in: [6462817b2f] user: drh branch: trunk, size: 12857)
2009-11-10
01:30
[3f196f6fd3] part of check-in [f6c045f649] Remove the obsolete "$Id:$" RCS identifier strings from the source code. (check-in: [f6c045f649] user: drh branch: trunk, size: 12167)
2009-03-23
04:33
[d02bd6a5b3] 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: 12230)
2009-02-19
14:39
[692c5b5014] part of check-in [d9f6ffbc5e] Changes to reduce the heap space consumed by triggers, views and tables in the in-memory representation of the schema. Also to reduce the space used by prepared statements slightly. (CVS 6305) (check-in: [d9f6ffbc5e] user: danielk1977 branch: trunk, size: 12229)
2009-02-05
03:00
[6f46eef2c2] part of check-in [a6fe3d6b02] Improved overrun detection in mem2.c (SQLITE_MEMDEBUG). Previously was only checking up to 3 extra bytes allocated due to rounding. (CVS 6261) (check-in: [a6fe3d6b02] user: shane branch: trunk, size: 12201)
2008-12-10
19:26
[4c53c0071d] part of check-in [c872d55493] 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) (check-in: [c872d55493] user: drh branch: trunk, size: 12119)
2008-12-05
17:17
[7029ff791a] part of check-in [adedd697b4] Fix harmless compiler warnings. Improved comments in the query optimizer. (CVS 5982) (check-in: [adedd697b4] user: drh branch: trunk, size: 12110)
2008-10-28
18:58
[5d9968f576] 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: 12033)
2008-09-01
18:34
[f87e681d0d] 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: 12133)
2008-08-12
15:04
[7256327b96] part of check-in [42247b917a] Fix further warnings/compilation errors in test code. (CVS 5558) (check-in: [42247b917a] user: danielk1977 branch: trunk, size: 12115)
2008-07-25
08:49
[87381b1435] part of check-in [43a4cae2ac] Updates to mem6.c allocator. (CVS 5473) (check-in: [43a4cae2ac] user: danielk1977 branch: trunk, size: 12115)
2008-07-24
23:34
[01726714af] part of check-in [599a9dea8f] Reduce the size of the parser allocation. Add additional instrumentation to mem2. speed1*.test uses scratch malloc. (CVS 5472) (check-in: [599a9dea8f] user: drh branch: trunk, size: 12101)
08:20
[1e14a86d12] part of check-in [192bc19218] Add mem6.c, a new allocator. More to come. (CVS 5467) (check-in: [192bc19218] user: danielk1977 branch: trunk, size: 11454)
2008-07-10
18:13
[0fc5bd6581] part of check-in [ed8b252500] Enhancements to the testing logic for malloc and mutex. Only permit one of MEMSYS3/5 to be compiled-in at a time. Omit the SQLITE_CONFIG_MEMSYS3/5 configuration options. (CVS 5389) (check-in: [ed8b252500] user: drh branch: trunk, size: 11361)
2008-06-19
01:03
[23f9538f35] part of check-in [005f8eaef5] Bug fixes: Plug a memory leak introduced by the previous check-in. Get the amalgamation to the point where it will compile. (CVS 5241) (check-in: [005f8eaef5] user: drh branch: trunk, size: 11394)
2008-06-18
17:09
[468a7fd5e0] part of check-in [5059644c4b] Implement the 'CONFIG_SINGLETHREAD' and 'CONFIG_MULTITHREAD' configuration modes. (CVS 5234) (check-in: [5059644c4b] user: danielk1977 branch: trunk, size: 11190)
2008-06-17
17:21
[594270b8f0] part of check-in [597283637b] Change the mutex interface to be pluggable. This is an incremental checkin, there are still changes to come. (CVS 5227) (check-in: [597283637b] user: danielk1977 branch: trunk, size: 11186)
15:12
[809d0e311c] part of check-in [3e797d0ffe] Add internal interfaces: PageMalloc/PageFree and ScratchMalloc/ScratchFree. (CVS 5226) (check-in: [3e797d0ffe] user: drh branch: trunk, size: 11177)
2008-06-15
02:51
[53d29d8275] 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: 11221)
2008-06-14
16:56
[10df776854] 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: 11177)
2008-06-13
18:24
[cb99d15225] 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: 12724)
2008-04-10
14:57
[3656205111] part of check-in [d11e8e307a] Make sure all memory allocations are 8-byte aligned. Ticket #3040. Note that the mem3.c memory allocator returns 4-byte aligned memory allocations. But as mem3.c is intended for use in 32-bit embedded systems, we are not going to change that. (CVS 4978) (check-in: [d11e8e307a] user: drh branch: trunk, size: 12618)
2008-04-03
10:13
[84f7ac94db] part of check-in [fd97f8762c] Change the allocator in mem2.c (used when SQLITE_MEMDEBUG is defined) so that allocations are not rounded up to the nearest 4 byte boundary. Fix a couple of errors in malloc.test related to sqlite3OsAccess() returning -1. (CVS 4956) (check-in: [fd97f8762c] user: danielk1977 branch: trunk, size: 12624)
2008-03-28
07:42
[37c410e289] part of check-in [f1b97ed931] If memory is leaked when running a test script with the --malloctrace option, write out a file called leaks.sql in the same format as mallocs.sql containing th e leaked applications. The same tools can then be used to examine the stack traces associated with leaked allocations. (CVS 4926) (check-in: [f1b97ed931] user: danielk1977 branch: trunk, size: 12353)
2008-03-21
14:22
[a4694eff73] part of check-in [79738f582f] Add some more logging to the malloc system used when SQLITE_MEMDEBUG is defined. (CVS 4901) (check-in: [79738f582f] user: danielk1977 branch: trunk, size: 12115)
2008-02-19
15:15
[a17fd71f39] part of check-in [94774b4142] Change non-exported memory interfaces to following the naming conventions. (CVS 4797) (check-in: [94774b4142] user: drh branch: trunk, size: 11864)
2008-02-14
23:26
[021eecbb21] 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: 11873)
2008-02-13
18:25
[ed0cb11ae4] 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: 12648)
2008-01-22
21:30
[607af52ad7] part of check-in [1a335e1801] Add the fault injector module in fault.c. Use it as a basis for memory allocation failure testing. (CVS 4742) (check-in: [1a335e1801] user: drh branch: trunk, size: 12204)
2007-11-29
18:36
[a9400e06b4] 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: 15831)
2007-11-05
17:54
[2a1da2e8de] 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: 15863)
2007-10-19
17:47
[3f669b5e20] 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: 15919)
2007-10-15
19:34
[8651e5306c] part of check-in [3e51696cb8] Add a malloc size histogram to the debugging malloc implementation in mem2.c. (CVS 4490) (check-in: [3e51696cb8] user: drh branch: trunk, size: 15873)
2007-10-03
08:46
[9c59519e47] part of check-in [12eca32a6a] Add automatic recovery from the pager "error-state". Also add a new error code - SQLITE_IOERR_NOMEM. (CVS 4454) (check-in: [12eca32a6a] user: danielk1977 branch: trunk, size: 15189)
2007-09-01
09:02
[b97b4662bf] 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: 14293)
2007-08-30
15:46
[20cfac1d52] part of check-in [49ce3a8381] Check in extra fixes for malloc4.test. (CVS 4341) (check-in: [49ce3a8381] user: danielk1977 branch: trunk, size: 14506)
2007-08-29
12:31
[2ba377e2f7] part of check-in [e38ef81b85] Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321) (check-in: [e38ef81b85] user: danielk1977 branch: trunk, size: 14447)
2007-08-24
04:15
[1a2ca756a2] part of check-in [a1b495c28a] Bug fix in the memory leak trace output. (CVS 4283) (check-in: [a1b495c28a] user: drh branch: trunk, size: 13950)
03:51
[dfe8021431] 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: 13911)
2007-08-23
02:47
[48919353f7] part of check-in [21f6b31097] Improvements to memory leak detection. The --backtrace=NNN option is now recognized by tester.tcl. Memory leak summaries are automatically written to the file ./memleak.txt and each leak is tagged with the test in which it occurred. The quick.test script runs on Linux with no errors and no leaks. (CVS 4273) (check-in: [21f6b31097] user: drh branch: trunk, size: 14406)
2007-08-22
22:04
[28a0d93063] part of check-in [205d0b881d] All of the malloc test cases run. Still seeing failures in malloc4.test. (CVS 4272) (check-in: [205d0b881d] user: drh branch: trunk, size: 13382)
20:18
[b707e02fec] 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: 13137)
2007-08-20
22:48
[482f0aaf14] part of check-in [1315bd8e12] Work toward multithreading support. Currently crashes quickly on a test. (CVS 4253) (check-in: [1315bd8e12] user: drh branch: trunk, size: 13022)
2007-08-16
19:40
[661ca7ebf6] 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: 12239)
2007-08-15
20:41
[d0ba3b23da] 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: 11945)
19:16
[1f3745eae1] part of check-in [9e50665672] Test infrastructure for the new memory subsystem. (CVS 4229) (check-in: [9e50665672] user: drh branch: trunk, size: 9807)
17:07
Added: [b8173ddcca] part of check-in [8d2d1c4ff9] Add a debugging memory allocator. (CVS 4227) (check-in: [8d2d1c4ff9] user: drh branch: trunk, size: 9735)