Version 3 of Tcl_Alloc

Updated 2016-07-15 06:44:30 by revc

Allocate memory using the Tcl library's memory allocation engine. Like malloc, but integrates with the memory command (if that's defined). Pairs up with Tcl_Realloc and Tcl_Free.

(2016-07-15) don't bother checking for memory allocation failure with Tcl_Alloc and ckalloc. If you look at the source of the function Tcl_Alloc in tcl/generic/tclCkalloc.c, you will see that Tcl_Panic is called in case of error. Tcl_Panic calls abort(), never to return.

This behavior is not mentioned in the documentation of Tcl_Alloc (http://www.tcl.tk/man/tcl8.6/TclLib/Alloc.htm ).