Tcl_AttemptAlloc is a function that was added to the Tcl C API in Tcl 8.4a2.
http://www.tcl.tk/man/tcl8.5/TclLib/Alloc.htm
It is identical in function to Tcl_Alloc, except that Tcl_AttemptAlloc will not cause the Tcl interpreter to panic if the memory allocation fails. If the allocation fails, these functions will instead return NULL.
See also: