mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-29 06:12:11 +03:00
Set commit properly for FreeBSD w/ overcommit.
When overcommit is enabled, commit needs to be set when doing mmap(). The
regression was introduced in f80c97e.
This commit is contained in:
parent
be0749f591
commit
50b473c883
1 changed files with 4 additions and 0 deletions
|
|
@ -186,6 +186,10 @@ pages_map(void *addr, size_t size, size_t alignment, bool *commit) {
|
|||
* touching existing mappings, and to mmap with specific alignment.
|
||||
*/
|
||||
{
|
||||
if (os_overcommits) {
|
||||
*commit = true;
|
||||
}
|
||||
|
||||
int prot = *commit ? PAGES_PROT_COMMIT : PAGES_PROT_DECOMMIT;
|
||||
int flags = mmap_flags;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue