Bug 1570021 - emacs: Requires overcommit
Summary: emacs: Requires overcommit
Keywords:
Status: CLOSED DUPLICATE of bug 1569478
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Synacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-20 12:53 UTC by Florian Weimer
Modified: 2018-04-23 07:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-23 07:19:47 UTC
Type: Bug


Attachments (Terms of Use)

Description Florian Weimer 2018-04-20 12:53:55 UTC
Emacs does this on startup:

mmap(NULL, 154618822656, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)

MAP_NORESERVE does not have the intended effect with vm.overcommit_memory=2 (which enables the beancounter/disables overcommit).

The standard way of reserving address space is to use a PROT_NONE mapping and make parts readable/writable as needed using mprotect later.  This will work with vm.overcommit_memory=2 as well because initially PROT_NONE mappings do not count towards the commit limit.

Seen with:

emacs-25.3-3.fc27.x86_64

Comment 1 Jan Synacek 2018-04-23 06:36:39 UTC
Is Emacs doing this? Or is it actually webkit, as in bug 1569478?

Comment 2 Florian Weimer 2018-04-23 07:19:47 UTC

*** This bug has been marked as a duplicate of bug 1569478 ***


Note You need to log in before you can comment on or make changes to this bug.