1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add mem6.c, a new allocator. More to come. (CVS 5467)

FossilOrigin-Name: 192bc192185a7b475ef9331e2a4a0dc68083ec03
This commit is contained in:
danielk1977
2008-07-24 08:20:40 +00:00
parent 80cc85b3c2
commit 2d34081de9
11 changed files with 510 additions and 37 deletions

View File

@@ -13,7 +13,7 @@
** This file contains code used to implement test interfaces to the
** memory allocation subsystem.
**
** $Id: test_malloc.c,v 1.38 2008/07/16 12:25:32 drh Exp $
** $Id: test_malloc.c,v 1.39 2008/07/24 08:20:40 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -956,6 +956,26 @@ static int test_config_memstatus(
return TCL_OK;
}
/*
** Usage: sqlite3_config_chunkalloc
**
*/
static int test_config_chunkalloc(
void * clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
int rc;
if( objc!=1 ){
Tcl_WrongNumArgs(interp, 1, objv, "");
return TCL_ERROR;
}
rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC);
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_OK;
}
/*
** Usage:
**
@@ -1142,6 +1162,7 @@ int Sqlitetest_malloc_Init(Tcl_Interp *interp){
{ "install_malloc_faultsim", test_install_malloc_faultsim ,0 },
{ "sqlite3_config_heap", test_config_heap ,0 },
{ "sqlite3_config_memstatus", test_config_memstatus ,0 },
{ "sqlite3_config_chunkalloc", test_config_chunkalloc ,0 },
{ "sqlite3_dump_memsys3", test_dump_memsys3 ,3 },
{ "sqlite3_dump_memsys5", test_dump_memsys3 ,5 }
};