Added debug levels for some serious errors (out of memory).

This commit is contained in:
likewise
2003-03-24 10:29:03 +00:00
parent 74f2b5e5f7
commit 20667e5163
3 changed files with 7 additions and 7 deletions

View File

@@ -149,7 +149,7 @@ mem_free(void *rmem)
if((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
DEBUGF(MEM_DEBUG, ("mem_free: illegal memory\n"));
DEBUGF(MEM_DEBUG | 3, ("mem_free: illegal memory\n"));
#ifdef MEM_STATS
++lwip_stats.mem.err;
#endif /* MEM_STATS */
@@ -199,7 +199,7 @@ mem_realloc(void *rmem, mem_size_t newsize)
(u8_t *)rmem < (u8_t *)ram_end);
if((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) {
DEBUGF(MEM_DEBUG, ("mem_realloc: illegal memory\n"));
DEBUGF(MEM_DEBUG | 3, ("mem_realloc: illegal memory\n"));
return rmem;
}
mem = (struct mem *)((u8_t *)rmem - SIZEOF_STRUCT_MEM);
@@ -291,7 +291,7 @@ mem_malloc(mem_size_t size)
return (u8_t *)mem + SIZEOF_STRUCT_MEM;
}
}
DEBUGF(MEM_DEBUG, ("mem_malloc: could not allocate %d bytes\n", (int)size));
DEBUGF(MEM_DEBUG | 2, ("mem_malloc: could not allocate %d bytes\n", (int)size));
#ifdef MEM_STATS
++lwip_stats.mem.err;
#endif /* MEM_STATS */