aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-10 10:52:25 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-10 10:52:25 +0000
commite7993f207c226a07125718de0feef8ac652c6696 (patch)
tree5d3cdf7911fd6ac9753ed1b9ebf1eefbce6e9e46
parentc7614ee9c55e61e527bf1e39239faf278177f122 (diff)
downloadglibc-e7993f207c226a07125718de0feef8ac652c6696.tar
glibc-e7993f207c226a07125718de0feef8ac652c6696.tar.gz
glibc-e7993f207c226a07125718de0feef8ac652c6696.tar.bz2
glibc-e7993f207c226a07125718de0feef8ac652c6696.zip
Update.
* include/byteswap.h: New file. * malloc/mtrace.c (mtrace): Use smaller output buffer to reduce .bss segment size. Patch by Joe Keane <jgk@jgk.org>.
-rw-r--r--ChangeLog5
-rw-r--r--include/byteswap.h1
-rw-r--r--malloc/mtrace.c6
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 77c1c71f0d..8b9281881e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
1998-04-10 Ulrich Drepper <drepper@cygnus.com>
+ * include/byteswap.h: New file.
+
+ * malloc/mtrace.c (mtrace): Use smaller output buffer to reduce
+ .bss segment size. Patch by Joe Keane <jgk@jgk.org>.
+
* inet/getnameinfo.c (getnameinfo): Change parameter to match
declaration. Patch by Richard Henderson.
diff --git a/include/byteswap.h b/include/byteswap.h
new file mode 100644
index 0000000000..44507de954
--- /dev/null
+++ b/include/byteswap.h
@@ -0,0 +1 @@
+#include <string/byteswap.h>
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index df5b944b28..0c8e411f63 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -40,9 +40,11 @@ extern char *getenv ();
#include <stdlib.h>
#endif
+#define TRACE_BUFFER_SIZE 512
+
static FILE *mallstream;
static const char mallenv[]= "MALLOC_TRACE";
-static char mallbuf[BUFSIZ]; /* Buffer for the output. */
+static char malloc_trace_buffer[TRACE_BUFFER_SIZE];
__libc_lock_define_initialized (static, lock);
@@ -242,7 +244,7 @@ mtrace ()
if (mallstream != NULL)
{
/* Be sure it doesn't malloc its buffer! */
- setbuf (mallstream, mallbuf);
+ setvbuf (mallstream, malloc_trace_buffer, TRACE_BUFFER_SIZE);
fprintf (mallstream, "= Start\n");
tr_old_free_hook = __free_hook;
__free_hook = tr_freehook;