summaryrefslogtreecommitdiff
path: root/src/lib
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
parent10837c3c47f1b9d7d1a061fff2327a4e280ba338 (diff)
downloadopenbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.tar.gz
openbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.tar.bz2
openbsd-fa6a8862d748e6cec964da061b6daa4995b3a4fd.zip
small cleanup of error/warning strings
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/malloc.36
-rw-r--r--src/lib/libc/stdlib/malloc.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3
index 8eeea6e58c..b9d62d04d0 100644
--- a/src/lib/libc/stdlib/malloc.3
+++ b/src/lib/libc/stdlib/malloc.3
@@ -30,9 +30,9 @@
30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31.\" SUCH DAMAGE. 31.\" SUCH DAMAGE.
32.\" 32.\"
33.\" $OpenBSD: malloc.3,v 1.53 2008/07/28 19:53:03 otto Exp $ 33.\" $OpenBSD: malloc.3,v 1.54 2008/08/07 18:41:47 otto Exp $
34.\" 34.\"
35.Dd $Mdocdate: July 28 2008 $ 35.Dd $Mdocdate: August 7 2008 $
36.Dt MALLOC 3 36.Dt MALLOC 3
37.Os 37.Os
38.Sh NAME 38.Sh NAME
@@ -391,7 +391,7 @@ or
391an unallocated pointer was made. 391an unallocated pointer was made.
392.It Dq chunk is already free 392.It Dq chunk is already free
393There was an attempt to free a chunk that had already been freed. 393There was an attempt to free a chunk that had already been freed.
394.It Dq modified (chunk-) pointer 394.It Dq modified chunk-pointer
395The pointer passed to 395The pointer passed to
396.Fn free 396.Fn free
397or 397or
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))) {