From: Scott S. <st...@aj...> - 2000-09-01 18:45:30
|
"D. Richard Hipp" said: > Perhaps Tcl_TryToAlloc() or Tcl_AttemptAlloc() > instead. Here the idea is "try to get me some > memory but its OK if you can't, just let me know." > This will be (I think) a seldom used function, > so a longer name is not a handicap. The existing TclpAlloc could be the right way to handle this. It is usually just a wrapper around malloc() on Unix, so if we fixed the Tcl allocator to avoid panics (as George suggested), then on all platforms it would return NULL on allocation failures. Then the outer Tcl_Alloc call can implement the guarantee never to return NULL. --Scott -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |