diff options
author | drh <drh@noemail.net> | 2013-11-26 18:00:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2013-11-26 18:00:29 +0000 |
commit | 1b2ee4fe1afb4edd3d04e62daeb133df41809e38 (patch) | |
tree | 3f90016343959f3349a8086cb43c38cb4de975a3 /src/test_malloc.c | |
parent | 212c6be1417860712de4b93b31342b72c9fa89dd (diff) | |
parent | 55fcab39be8186caac6c7d1262a7c943564623bb (diff) | |
download | sqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.tar.gz sqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.zip |
Merge in performance enhancements from trunk.
FossilOrigin-Name: fc9ae839569eb28eb734c52d95676c59b2e27494
Diffstat (limited to 'src/test_malloc.c')
-rw-r--r-- | src/test_malloc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test_malloc.c b/src/test_malloc.c index f513e24bf..e3cfcaa9f 100644 --- a/src/test_malloc.c +++ b/src/test_malloc.c @@ -1131,6 +1131,33 @@ static int test_config_heap( } /* +** Usage: sqlite3_config_heap_size NBYTE +*/ +static int test_config_heap_size( + void * clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj *CONST objv[] +){ + int nByte; /* Size to pass to sqlite3_config() */ + int rc; /* Return code of sqlite3_config() */ + + Tcl_Obj * CONST *aArg = &objv[1]; + int nArg = objc-1; + + if( nArg!=1 ){ + Tcl_WrongNumArgs(interp, 1, objv, "NBYTE"); + return TCL_ERROR; + } + if( Tcl_GetIntFromObj(interp, aArg[0], &nByte) ) return TCL_ERROR; + + rc = sqlite3_config(SQLITE_CONFIG_WIN32_HEAPSIZE, nByte); + + Tcl_SetResult(interp, (char *)sqlite3ErrName(rc), TCL_VOLATILE); + return TCL_OK; +} + +/* ** Usage: sqlite3_config_error [DB] ** ** Invoke sqlite3_config() or sqlite3_db_config() with invalid @@ -1473,6 +1500,7 @@ int Sqlitetest_malloc_Init(Tcl_Interp *interp){ { "sqlite3_db_status", test_db_status ,0 }, { "install_malloc_faultsim", test_install_malloc_faultsim ,0 }, { "sqlite3_config_heap", test_config_heap ,0 }, + { "sqlite3_config_heap_size", test_config_heap_size ,0 }, { "sqlite3_config_memstatus", test_config_memstatus ,0 }, { "sqlite3_config_lookaside", test_config_lookaside ,0 }, { "sqlite3_config_error", test_config_error ,0 }, |