public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* A patch for malloc
@ 1998-08-11  7:38 H.J. Lu
  1998-08-11 14:02 ` Ulrich Drepper
  0 siblings, 1 reply; 4+ messages in thread
From: H.J. Lu @ 1998-08-11  7:38 UTC (permalink / raw)
  To: GNU C Library

Here is a patch for malloc. It is quite confusing without 0x.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
---
Tue Aug 11 07:37:50 1998  H.J. Lu  (hjl@gnu.org)

	* malloc/malloc.c (free_check): Add 0x to print a pointer.
	(realloc_check): Likewise.

Index: malloc/malloc.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc-2.0/malloc/malloc.c,v
retrieving revision 1.1.1.4
diff -p -u -r1.1.1.4 malloc.c
--- malloc.c	1998/05/20 21:51:16	1.1.1.4
+++ malloc.c	1998/08/11 14:36:20
@@ -4269,7 +4269,7 @@ free_check(mem) Void_t* mem;
     (void)mutex_unlock(&main_arena.mutex);
     switch(check_action) {
     case 1:
-      fprintf(stderr, "free(): invalid pointer %lx!\n", (long)(mem));
+      fprintf(stderr, "free(): invalid pointer 0x%lx!\n", (long)(mem));
       break;
     case 2:
       abort();
@@ -4307,7 +4307,7 @@ realloc_check(oldmem, bytes) Void_t* old
     (void)mutex_unlock(&main_arena.mutex);
     switch(check_action) {
     case 1:
-      fprintf(stderr, "realloc(): invalid pointer %lx!\n", (long)(oldmem));
+      fprintf(stderr, "realloc(): invalid pointer 0x%lx!\n", (long)(oldmem));
       break;
     case 2:
       abort();

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-08-06 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <37AB46E7.7228E760@wserv.com>
1999-08-06 14:33 ` A patch for malloc H.J. Lu
1999-08-06 15:59   ` Ulrich Drepper
1998-08-11  7:38 H.J. Lu
1998-08-11 14:02 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).