Refactor arena_mapbits unzeroed flag management.

Only set the unzeroed flag when initializing the entire mapbits entry,
rather than mutating just the unzeroed bit.  This simplifies the
possible mapbits state transitions.
This commit is contained in:
Jason Evans 2015-08-10 23:03:34 -07:00
parent de249c8679
commit 45186f0c07
4 changed files with 35 additions and 37 deletions

View file

@ -102,7 +102,7 @@ pages_commit_impl(void *addr, size_t size, bool commit)
{
#ifndef _WIN32
if (config_debug) {
if (false &&/*XXX*/ config_debug) {
int prot = commit ? (PROT_READ | PROT_WRITE) : PROT_NONE;
void *result = mmap(addr, size, prot, MAP_PRIVATE | MAP_ANON |
MAP_FIXED, -1, 0);