]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Apr 2012 07:50:17 +0000 (00:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Apr 2012 07:50:17 +0000 (00:50 -0700)
* alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
Do not assume ptrdiff_t is the same width as 'int'.

src/ChangeLog
src/alloc.c

index fb7498b6298129e5a6b5597a618ae2b605b60a96..a1220aeaa7da7ce0f455586ac11ae07c0dd5e0fd 100644 (file)
@@ -1,5 +1,9 @@
 2012-04-22  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
+       * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
+       Do not assume ptrdiff_t is the same width as 'int'.
+
        * alloc.c: Handle unusual debugging option combinations.
        (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
        since the two debugging options are incompatible.
index b029343a8484c7f9b180a970c3ee980a873c8c85..6c9af7b71faf3377cff2a9b81bb2a3c03bcab618 100644 (file)
@@ -1314,7 +1314,7 @@ emacs_blocked_malloc (size_t size, const void *ptr)
       {
        fprintf (stderr, "Malloc returned %p which is already in use\n",
                 value);
-       fprintf (stderr, "Region in use is %p...%p, %u bytes, type %d\n",
+       fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n",
                 m->start, m->end, (char *) m->end - (char *) m->start,
                 m->type);
        abort ();