summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
authorotto <>2008-08-07 18:41:47 +0000
committerotto <>2008-08-07 18:41:47 +0000
commitfa6a8862d748e6cec964da061b6daa4995b3a4fd (patch)
treeab2b83eaf101e031704b9e4f35be361112d8f9fe /src/lib/libc/stdlib/malloc.c
parent10837c3c47f1b9d7d1a061fff2327a4e280ba338 (diff)
downloadopenbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.tar.gz
openbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.tar.bz2
openbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.zip
small cleanup of error/warning strings
Diffstat (limited to 'src/lib/libc/stdlib/malloc.c')
-rw-r--r--src/lib/libc/stdlib/malloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c
index ae8cd8157b..645dc5afc9 100644
--- a/src/lib/libc/stdlib/malloc.c
+++ b/src/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc.c,v 1.92 2008/07/28 04:56:38 otto Exp $ */ 1/* $OpenBSD: malloc.c,v 1.93 2008/08/07 18:41:47 otto Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
4 * 4 *
@@ -389,7 +389,7 @@ unmap(struct dir_info *d, void *p, size_t sz)
389 389
390 if (psz > malloc_cache) { 390 if (psz > malloc_cache) {
391 if (munmap(p, sz)) 391 if (munmap(p, sz))
392 wrterror("unmap"); 392 wrterror("munmap");
393 malloc_used -= sz; 393 malloc_used -= sz;
394 return; 394 return;
395 } 395 }
@@ -701,7 +701,7 @@ omalloc_grow(struct dir_info *d)
701 } 701 }
702 /* avoid pages containing meta info to end up in cache */ 702 /* avoid pages containing meta info to end up in cache */
703 if (munmap(d->r, d->regions_total * sizeof(struct region_info))) 703 if (munmap(d->r, d->regions_total * sizeof(struct region_info)))
704 wrterror("omalloc_grow munmap"); 704 wrterror("munmap");
705 else 705 else
706 malloc_used -= d->regions_total * sizeof(struct region_info); 706 malloc_used -= d->regions_total * sizeof(struct region_info);
707 d->regions_free = d->regions_free + d->regions_total; 707 d->regions_free = d->regions_free + d->regions_total;
@@ -989,7 +989,7 @@ free_bytes(struct dir_info *d, struct region_info *r, void *ptr)
989 i = ((uintptr_t)ptr & MALLOC_PAGEMASK) >> info->shift; 989 i = ((uintptr_t)ptr & MALLOC_PAGEMASK) >> info->shift;
990 990
991 if ((uintptr_t)ptr & ((1UL << (info->shift)) - 1)) { 991 if ((uintptr_t)ptr & ((1UL << (info->shift)) - 1)) {
992 wrtwarning("modified (chunk-) pointer"); 992 wrtwarning("modified chunk-pointer");
993 return; 993 return;
994 } 994 }
995 if (info->bits[i / MALLOC_BITS] & (1UL << (i % MALLOC_BITS))) { 995 if (info->bits[i / MALLOC_BITS] & (1UL << (i % MALLOC_BITS))) {