mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
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
This commit is contained in:
10
src/main.c
10
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>
|
||||
@@ -156,6 +156,14 @@ int sqlite3_config(int op, ...){
|
||||
sqlite3MemSetMemsys3(pMem, nMem);
|
||||
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 */
|
||||
|
||||
Reference in New Issue
Block a user