* 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>.
This commit is contained in:
Ulrich Drepper 1998-04-10 10:52:25 +00:00
parent c7614ee9c5
commit e7993f207c
3 changed files with 10 additions and 2 deletions

View File

@ -1,5 +1,10 @@
1998-04-10 Ulrich Drepper <drepper@cygnus.com> 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 * inet/getnameinfo.c (getnameinfo): Change parameter to match
declaration. Patch by Richard Henderson. declaration. Patch by Richard Henderson.

1
include/byteswap.h Normal file
View File

@ -0,0 +1 @@
#include <string/byteswap.h>

View File

@ -40,9 +40,11 @@ extern char *getenv ();
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#define TRACE_BUFFER_SIZE 512
static FILE *mallstream; static FILE *mallstream;
static const char mallenv[]= "MALLOC_TRACE"; 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); __libc_lock_define_initialized (static, lock);
@ -242,7 +244,7 @@ mtrace ()
if (mallstream != NULL) if (mallstream != NULL)
{ {
/* Be sure it doesn't malloc its buffer! */ /* Be sure it doesn't malloc its buffer! */
setbuf (mallstream, mallbuf); setvbuf (mallstream, malloc_trace_buffer, TRACE_BUFFER_SIZE);
fprintf (mallstream, "= Start\n"); fprintf (mallstream, "= Start\n");
tr_old_free_hook = __free_hook; tr_old_free_hook = __free_hook;
__free_hook = tr_freehook; __free_hook = tr_freehook;