projects
/
kopensolaris-gnu
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd5ddd5
)
(Hooks for Malloc): In example, protect printf from calling malloc and
author
roland
<roland>
Thu, 8 Dec 1994 06:56:03 +0000
(06:56 +0000)
committer
roland
<roland>
Thu, 8 Dec 1994 06:56:03 +0000
(06:56 +0000)
recursing.
manual/memory.texi
patch
|
blob
|
history
diff --git
a/manual/memory.texi
b/manual/memory.texi
index
dd1b51b
..
9269380
100644
(file)
--- a/
manual/memory.texi
+++ b/
manual/memory.texi
@@
-610,8
+610,9
@@
my_malloc_hook (size_t size)
void *result;
__malloc_hook = old_malloc_hook;
result = malloc (size);
- __malloc_hook = my_malloc_hook;
+ /* @r{@code{printf} might call @code{malloc}, so protect it too.} */
printf ("malloc (%u) returns %p\n", (unsigned int) size, result);
+ __malloc_hook = my_malloc_hook;
return result;
@}