Bug 97995 - Remove unused sys/mman.h include
Summary: Remove unused sys/mman.h include
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 00:00 PDT by Jonathan Liu
Modified: 2012-10-01 14:28 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.20 KB, patch)
2012-10-01 00:05 PDT, Jonathan Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Liu 2012-10-01 00:00:48 PDT
Source/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp contains an include for sys/mman.h that isn't used.
As sys/mman.h is not available on all operating systems, this also improves portability.
Comment 1 Jonathan Liu 2012-10-01 00:05:40 PDT
Created attachment 166415 [details]
Patch
Comment 2 Kentaro Hara 2012-10-01 01:15:11 PDT
Comment on attachment 166415 [details]
Patch

ok
Comment 3 WebKit Review Bot 2012-10-01 01:35:43 PDT
Comment on attachment 166415 [details]
Patch

Clearing flags on attachment: 166415

Committed r130014: <http://trac.webkit.org/changeset/130014>
Comment 4 WebKit Review Bot 2012-10-01 01:35:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2012-10-01 14:28:21 PDT
Comment on attachment 166415 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=166415&action=review

> Source/JavaScriptCore/ChangeLog:9
> +        The sys/mman.h is not used and removing it improves portability as not
> +        all systems have sys/mman.h.

Where did you get the information <sys/mman.h> is not used? On OS X the madvise function and MADV_FREE constant that are used in this file is from that header. The correct change would be to put this include inside #if OS(DARWIN).

Unless there is some other reason that we don’t need the include on OS X that I am not aware of.