Bug 97995

Summary: Remove unused sys/mman.h include
Product: WebKit Reporter: Jonathan Liu <net147>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, darin, ggaren, haraken, hausmann, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.