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

Updates to mem6.c allocator. (CVS 5473)

FossilOrigin-Name: 43a4cae2acea33d1a17c0037516e9c27fb7e8e91
This commit is contained in:
danielk1977
2008-07-25 08:48:59 +00:00
parent 2abcd58f09
commit 31fab4f30b
11 changed files with 103 additions and 46 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.39 2008/07/24 08:20:40 danielk1977 Exp $
** $Id: test_malloc.c,v 1.40 2008/07/25 08:49:00 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "tcl.h"
@@ -967,11 +967,13 @@ static int test_config_chunkalloc(
Tcl_Obj *CONST objv[]
){
int rc;
if( objc!=1 ){
Tcl_WrongNumArgs(interp, 1, objv, "");
int nThreshold;
if( objc!=2 ){
Tcl_WrongNumArgs(interp, 1, objv, "THRESHOLD");
return TCL_ERROR;
}
rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC);
if( Tcl_GetIntFromObj(interp, objv[1], &nThreshold) ) return TCL_ERROR;
rc = sqlite3_config(SQLITE_CONFIG_CHUNKALLOC, nThreshold);
Tcl_SetObjResult(interp, Tcl_NewIntObj(rc));
return TCL_OK;
}