forked from openbsd/ports
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make MALLOC_STATS compile again; noted by Omar Polo and Joe Nelson
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: malloc.c,v 1.270 2021/04/09 06:05:21 otto Exp $ */ | ||
/* $OpenBSD: malloc.c,v 1.271 2021/07/23 18:04:28 otto Exp $ */ | ||
/* | ||
* Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <[email protected]> | ||
* Copyright (c) 2012 Matthew Dempsky <[email protected]> | ||
|
@@ -1610,7 +1610,7 @@ orealloc(struct dir_info **argpool, void *p, size_t newsz, void *f) | |
} | ||
if (munmap((char *)r->p + rnewsz, roldsz - rnewsz)) | ||
wrterror(pool, "munmap %p", (char *)r->p + rnewsz); | ||
STATS_SUB(d->malloc_used, roldsz - rnewsz); | ||
STATS_SUB(pool->malloc_used, roldsz - rnewsz); | ||
r->size = gnewsz; | ||
if (MALLOC_MOVE_COND(gnewsz)) { | ||
void *pp = MALLOC_MOVE(r->p, gnewsz); | ||
|