Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
GDB does not use the functions
GDB uses the functions
xcalloc when allocating memory. Unlike
these functions do not return when the memory pool is empty. Instead,
they unwind the stack using cleanups. These functions return
NULL when requested to allocate a chunk of memory of size zero.
Pragmatics: By using these functions, the need to check every memory allocation is removed. These functions provide portable behavior.
GDB does not use the function
GDB uses the function
xfree to return memory to the
memory pool. Consistent with ISO-C, this function ignores a request to
Pragmatics: On some systems
free fails when passed a
GDB can use the non-portable function
alloca for the
allocation of small temporary values (such as strings).
Pragmatics: This function is very non-portable. Some systems restrict the memory being allocated to no more than a few kilobytes.
GDB uses the string function
xstrdup and the print
strdup can fail. Print
functions such as
sprintf are very prone to buffer overflow
|webmaster donations bookstore||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|