aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-06-25 14:26:07 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-06-25 14:26:07 +0000
commitc66c0e14a69504fecfe19cfd0e031e94c1b0b1e3 (patch)
tree55edb443e6b63863bf505e432a4e29e7bf12d6c7 /src/main.c
parent32155ef0ff75d468632d0f1428be1bc4888060a1 (diff)
downloadsqlite-c66c0e14a69504fecfe19cfd0e031e94c1b0b1e3.tar.gz
sqlite-c66c0e14a69504fecfe19cfd0e031e94c1b0b1e3.zip
Fix the allocator in mem5.c so that it can be enabled at run time using the sqlite3_config() function. (CVS 5304)
FossilOrigin-Name: 30ff6bb0b2d1068d28e86ac90bb9f454e4537a2d
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 5f231f181..36fe82bbf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
-** $Id: main.c,v 1.460 2008/06/25 10:34:35 danielk1977 Exp $
+** $Id: main.c,v 1.461 2008/06/25 14:26:08 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -157,6 +157,14 @@ int sqlite3_config(int op, ...){
break;
}
#endif
+#ifdef SQLITE_ENABLE_MEMSYS5
+ case SQLITE_CONFIG_MEMSYS5: {
+ u8 *pMem = va_arg(ap, u8*);
+ int nMem = va_arg(ap, int);
+ sqlite3MemSetMemsys5(pMem, nMem);
+ break;
+ }
+#endif
case SQLITE_CONFIG_MALLOC: {
/* Specify an alternative malloc implementation */
sqlite3Config.m = *va_arg(ap, sqlite3_mem_methods*);