move memory_unmap outside of lock scope

pull/50/merge
Daniel Micay 2018-10-12 15:06:51 -04:00
parent b2007ad3d9
commit 6669166fe9
1 changed files with 4 additions and 3 deletions

View File

@ -556,13 +556,14 @@ static void regions_quarantine_deallocate_pages(void *p, size_t size, size_t gua
} }
a = regions_quarantine_queue[regions_quarantine_index]; a = regions_quarantine_queue[regions_quarantine_index];
if (a.p != NULL) {
memory_unmap(a.p, a.size);
}
regions_quarantine_queue[regions_quarantine_index] = b; regions_quarantine_queue[regions_quarantine_index] = b;
regions_quarantine_index = (regions_quarantine_index + 1) % REGION_QUARANTINE_QUEUE_SIZE; regions_quarantine_index = (regions_quarantine_index + 1) % REGION_QUARANTINE_QUEUE_SIZE;
mutex_unlock(&regions_lock); mutex_unlock(&regions_lock);
if (a.p != NULL) {
memory_unmap(a.p, a.size);
}
} }
static size_t hash_page(void *p) { static size_t hash_page(void *p) {