From: Pekka Riikonen Date: Fri, 13 Jul 2007 20:07:59 +0000 (+0000) Subject: Better error message. X-Git-Tag: 1.2.beta1~168 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=b6cb90e6f0cc9767591f832b148822583b79fd3d;p=runtime.git Better error message. --- diff --git a/lib/silcutil/silcmemory.c b/lib/silcutil/silcmemory.c index 62a86165..067cf1a3 100644 --- a/lib/silcutil/silcmemory.c +++ b/lib/silcutil/silcmemory.c @@ -28,7 +28,7 @@ void *silc_malloc(size_t size) { void *addr; if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) { - SILC_LOG_ERROR(("Invalid memory allocation")); + SILC_LOG_ERROR(("Invalid memory allocation, allocation by %x", size)); return NULL; } addr = malloc(size); @@ -41,7 +41,7 @@ void *silc_calloc(size_t items, size_t size) { void *addr; if (silc_unlikely(size * items <= 0 || size * items >= SILC_MAX_ALLOC)) { - SILC_LOG_ERROR(("Invalid memory allocation")); + SILC_LOG_ERROR(("Invalid memory allocation, allocation by %x", size)); return NULL; } addr = calloc(items, size); @@ -54,7 +54,7 @@ void *silc_realloc(void *ptr, size_t size) { void *addr; if (silc_unlikely(size <= 0 || size >= SILC_MAX_ALLOC)) { - SILC_LOG_ERROR(("Invalid memory allocation")); + SILC_LOG_ERROR(("Invalid memory allocation, allocation by %x", size)); return NULL; } addr = realloc(ptr, size);