mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Fixed improper memory release
This commit is contained in:
parent
1982bce1a8
commit
9e27a69c2f
@ -764,7 +764,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
|
||||
offset = alignment - offset;
|
||||
zend_mm_munmap(ptr, offset);
|
||||
ptr = (char*)ptr + offset;
|
||||
} else {
|
||||
alignment -= offset;
|
||||
}
|
||||
if (alignment > REAL_PAGE_SIZE) {
|
||||
zend_mm_munmap((char*)ptr + size, alignment - REAL_PAGE_SIZE);
|
||||
}
|
||||
# ifdef MADV_HUGEPAGE
|
||||
|
Loading…
Reference in New Issue
Block a user