aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
Diffstat (limited to 'manual')
-rw-r--r--manual/Makefile8
-rw-r--r--manual/memory.texi14
2 files changed, 21 insertions, 1 deletions
diff --git a/manual/Makefile b/manual/Makefile
index c528493..c56dd32 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -69,6 +69,12 @@ endef
libc.dvi libc.info: $(chapters) summary.texi $(chapters-incl)
libc.dvi: texinfo.tex
+%.info: %.texinfo
+ $(MAKEINFO) $<
+
+%.dvi: %.texinfo
+ $(TEXI2DVI) $<
+
# Generate the summary from the Texinfo source files for each chapter.
summary.texi: stamp-summary ;
stamp-summary: summary.awk $(chapters) $(chapters-incl)
@@ -81,7 +87,7 @@ stamp-summary: summary.awk $(chapters) $(chapters-incl)
# Generate a file which can be added to the `dir' content to provide direct
# access to the documentation of the function, variables, and other
# definitions.
-dir-add.texi: xtract-typefun.awk $(chapters) $(chapters-incl)
+dir-add.texinfo: xtract-typefun.awk $(chapters) $(chapters-incl)
(echo "@dircategory GNU C library functions"; \
echo "@direntry"; \
$(GAWK) -f $^ | sort; \
diff --git a/manual/memory.texi b/manual/memory.texi
index 4e42b47..09147bc 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -611,6 +611,20 @@ The block was already freed.
@end table
@end deftp
+Another possibility to check for and guard against bugs in the use of
+@code{malloc}, @code{realloc} and @code{free} is to set the environment
+variable @code{MALLOC_CHECK_}. When @code{MALLOC_CHECK_} is set, a
+special (less efficient) implementation is used which is designed to be
+tolerant against simple errors, such as double calls of @code{free} with
+the same argument, or overruns of a single byte (off-by-one bugs). Not
+all such errors can be proteced against, however, and memory leaks can
+result. If @code{MALLOC_CHECK_} is set to @code{0}, any detected heap
+corruption is silently ignored; if set to @code{1}, a diagnostic is
+printed on @code{stderr}; if set to @code{2}, @code{abort} is called
+immediately. This can be useful because otherwise a crash may happen
+much later, and the true cause for the problem is then very hard to
+track down.
+
@node Hooks for Malloc
@subsection Storage Allocation Hooks
@cindex allocation hooks, for @code{malloc}