| Summary: | Source/WTF/wtf/OSAllocatorPosix.cpp fails to build on OS X Leopard due to madvise() extensions not being available | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jeremy Huddleston Sequoia <jeremyhu> | ||||||
| Component: | Web Template Framework | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | NEW --- | ||||||||
| Severity: | Normal | CC: | cgarcia, mrobinson, ossy | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
It looks like the code is guarded:
#elif HAVE(MADV_FREE_REUSE)
while (madvise(address, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { }
so the issue is that HAVE(MADV_FREE_REUSE) is not working right.
I'm testing a patch of Platform.h for Leopard now. Created attachment 244284 [details]
Fix Platform.h for Leopard
Created attachment 244285 [details]
Fix malloc struct for Leopard
With these two patches, webkit-gtk builds correctly against the Leopard SDK. |
Compilation of webkit-gtk-2.4.7 fails on OS X Leopard: :info:build Source/WTF/wtf/OSAllocatorPosix.cpp:54:35: error: use of undeclared identifier 'MADV_FREE_REUSABLE' :info:build while (madvise(result, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { } :info:build ^ :info:build Source/WTF/wtf/OSAllocatorPosix.cpp:139:36: error: use of undeclared identifier 'MADV_FREE_REUSE' :info:build while (madvise(address, bytes, MADV_FREE_REUSE) == -1 && errno == EAGAIN) { } :info:build ^ :info:build Source/WTF/wtf/OSAllocatorPosix.cpp:156:36: error: use of undeclared identifier 'MADV_FREE_REUSABLE' :info:build while (madvise(address, bytes, MADV_FREE_REUSABLE) == -1 && errno == EAGAIN) { } :info:build ^ :info:build 3 errors generated. :info:build GNUmakefile:52455: recipe for target 'Source/WTF/wtf/libWTF_la-OSAllocatorPosix.lo' failed :info:build gmake: *** [Source/WTF/wtf/libWTF_la-OSAllocatorPosix.lo] Error 1 This happens because Leopard does not support: #define MADV_ZERO_WIRED_PAGES 6 /* zero the wired pages that have not been unwired before the entry is deleted */ #define MADV_FREE_REUSABLE 7 /* pages can be reused (by anyone) */ #define MADV_FREE_REUSE 8 /* caller wants to reuse those pages */ #define MADV_CAN_REUSE 9