Browse Source

small cleanup of error/warning strings

OPENBSD_4_5
otto 16 years ago
parent
commit
3b4110eeac
2 changed files with 7 additions and 7 deletions
  1. +3
    -3
      src/lib/libc/stdlib/malloc.3
  2. +4
    -4
      src/lib/libc/stdlib/malloc.c

+ 3
- 3
src/lib/libc/stdlib/malloc.3 View File

@ -30,9 +30,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $OpenBSD: malloc.3,v 1.53 2008/07/28 19:53:03 otto Exp $
.\" $OpenBSD: malloc.3,v 1.54 2008/08/07 18:41:47 otto Exp $
.\"
.Dd $Mdocdate: July 28 2008 $
.Dd $Mdocdate: August 7 2008 $
.Dt MALLOC 3
.Os
.Sh NAME
@ -391,7 +391,7 @@ or
an unallocated pointer was made.
.It Dq chunk is already free
There was an attempt to free a chunk that had already been freed.
.It Dq modified (chunk-) pointer
.It Dq modified chunk-pointer
The pointer passed to
.Fn free
or


+ 4
- 4
src/lib/libc/stdlib/malloc.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: malloc.c,v 1.92 2008/07/28 04:56:38 otto Exp $ */
/* $OpenBSD: malloc.c,v 1.93 2008/08/07 18:41:47 otto Exp $ */
/*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
*
@ -389,7 +389,7 @@ unmap(struct dir_info *d, void *p, size_t sz)
if (psz > malloc_cache) {
if (munmap(p, sz))
wrterror("unmap");
wrterror("munmap");
malloc_used -= sz;
return;
}
@ -701,7 +701,7 @@ omalloc_grow(struct dir_info *d)
}
/* avoid pages containing meta info to end up in cache */
if (munmap(d->r, d->regions_total * sizeof(struct region_info)))
wrterror("omalloc_grow munmap");
wrterror("munmap");
else
malloc_used -= d->regions_total * sizeof(struct region_info);
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)
i = ((uintptr_t)ptr & MALLOC_PAGEMASK) >> info->shift;
if ((uintptr_t)ptr & ((1UL << (info->shift)) - 1)) {
wrtwarning("modified (chunk-) pointer");
wrtwarning("modified chunk-pointer");
return;
}
if (info->bits[i / MALLOC_BITS] & (1UL << (i % MALLOC_BITS))) {


Loading…
Cancel
Save