Skip to content

Commit

Permalink
Adjust GC_debug_malloc/realloc_replacement macro to match the API fun…
Browse files Browse the repository at this point in the history
…ction

* malloc.c (GC_debug_malloc_replacement): Pass NULL (instead of
"unknown") to "s" argument of GC_debug_malloc to match that
replacement definition in dbg_mlc.c.
* mallocx.c (GC_debug_realloc_replacement): Likewise.
  • Loading branch information
ivmai committed Aug 25, 2013
1 parent 2cd6188 commit e692333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,8 @@ GC_API void * GC_CALL GC_malloc_uncollectable(size_t lb)
/* malloc replacements. Otherwise we end up saving a */
/* meaningless return address in the object. It also speeds things up, */
/* but it is admittedly quite ugly. */

# define GC_debug_malloc_replacement(lb) \
GC_debug_malloc(lb, GC_DBG_RA "unknown", 0)
GC_debug_malloc(lb, GC_DBG_RA NULL, 0)

void * malloc(size_t lb)
{
Expand Down
3 changes: 1 addition & 2 deletions mallocx.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ GC_API void * GC_CALL GC_realloc(void * p, size_t lb)
# ifdef REDIRECT_REALLOC

/* As with malloc, avoid two levels of extra calls here. */

# define GC_debug_realloc_replacement(p, lb) \
GC_debug_realloc(p, lb, GC_DBG_RA "unknown", 0)
GC_debug_realloc(p, lb, GC_DBG_RA NULL, 0)

void * realloc(void * p, size_t lb)
{
Expand Down

0 comments on commit e692333

Please sign in to comment.