HomeFreeBSD

crt_malloc: Be more persistent when handling mmap() failure

Description

crt_malloc: Be more persistent when handling mmap() failure

In the situation with limited address space, together with
fragmentation, it is possible for mmap() request in morecore() to fail
when asking for required size + NPOOLPAGES, but succeed without the
addend. Retry allocation there.

PR: 259076
Reported by: Denis Koreshkov <dynamic-wind@mail.ru>
Reviewed by: arichardson
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32474

Details

Provenance
kibAuthored on Oct 11 2021, 4:13 PM
Reviewer
arichardson
Differential Revision
D32474: crt_malloc: Be more persistent when handling mmap() failure
Parents
rG0b72d2965d68: crt_malloc: use uintptr_t instead of long for arithmetic on addresses
Branches
Unknown
Tags
Unknown