vtmalloc is a fast memory allocator for multi-threaded applications and Tcl. vtmalloc project provides low contention and the ability to return memory to the system.
Tcl
Replace exiting tclThreadAlloc. in the Tcl distribution and recompile with
--enable-threads option. Or use LD_PRELOAD=tclThreadAlloc.so before loading your application.
There is command Tcl_VTMallocCtlObjCmd which can be used in application to force deallocating global pages as well.
To use it in your Tcl program, link it with libvtmalloc.so and execute
extern Tcl_ObjProc Tcl_VTMallocCtlObjCmd;
Tcl_CreateObjCommand(interp, "vtmalloc_ctl", Tcl_VTMallocCtlObjCmd, NULL, NULL);
What's New in This Release:
· Greatly improved speed and memory usage.
Product's homepage