Bug 176211 - Large virtual memory region allocation requires MMAP_NORESERVE in Linux
Summary: Large virtual memory region allocation requires MMAP_NORESERVE in Linux
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-08-31 22:36 PDT by Yusuke Suzuki
Modified: 2017-09-27 12:52 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.38 KB, patch)
2017-08-31 22:59 PDT, Yusuke Suzuki
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-08-31 22:36:29 PDT
Large virtual memory region allocation requires MMAP_NORESERVE in Linux
Comment 1 Yusuke Suzuki 2017-08-31 22:59:30 PDT
Created attachment 319579 [details]
Patch
Comment 2 Geoffrey Garen 2017-09-01 11:16:58 PDT
Comment on attachment 319579 [details]
Patch

I have a slight preference for defining BMALLOC_MMAP_FLAGS at the top of the file like we have BMALLOC_VM_TAG. It's nice to factor platform logic out of the core logic of the function. I find #ifdef'd code hard to read. 

Another option would be to define BMALLOC_NORESERVE at the top of the file, and make it something innocuous on Darwin like 0.
Comment 3 Yusuke Suzuki 2017-09-03 03:22:59 PDT
(In reply to Geoffrey Garen from comment #2)
> Comment on attachment 319579 [details]
> Patch
> 
> I have a slight preference for defining BMALLOC_MMAP_FLAGS at the top of the
> file like we have BMALLOC_VM_TAG. It's nice to factor platform logic out of
> the core logic of the function. I find #ifdef'd code hard to read. 
> 
> Another option would be to define BMALLOC_NORESERVE at the top of the file,
> and make it something innocuous on Darwin like 0.

BMALLOC_NORESERVE sounds very nice. I'll apply this change :)
Comment 4 Yusuke Suzuki 2017-09-03 03:31:34 PDT
Committed r221548: <http://trac.webkit.org/changeset/221548>
Comment 5 Radar WebKit Bug Importer 2017-09-27 12:52:26 PDT
<rdar://problem/34694184>