mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Put the warning printfs inside #ifdef DEBUG.
This commit is contained in:
parent
5ec396c9cb
commit
f4b6627d52
@ -276,9 +276,11 @@ pr_ZoneRealloc(void *oldptr, PRUint32 bytes)
|
||||
PR_ASSERT(mb->s.magic == ZONE_MAGIC);
|
||||
if (mb->s.magic != ZONE_MAGIC) {
|
||||
/* Maybe this just came from ordinary malloc */
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,
|
||||
"Warning: reallocing memory block %p from ordinary malloc\n",
|
||||
oldptr);
|
||||
#endif
|
||||
/* We don't know how big it is. But we can fix that. */
|
||||
oldptr = realloc(oldptr, bytes);
|
||||
if (!oldptr) {
|
||||
@ -333,8 +335,10 @@ pr_ZoneFree(void *ptr)
|
||||
|
||||
if (mb->s.magic != ZONE_MAGIC) {
|
||||
/* maybe this came from ordinary malloc */
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr,
|
||||
"Warning: freeing memory block %p from ordinary malloc\n", ptr);
|
||||
#endif
|
||||
free(ptr);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user