Skip to content
Permalink
Browse files
[Darwin] Use vm_kernel_page_size for WTF::pageSize().
<https://webkit.org/b/154726>

Reviewed by Antti Koivisto.

Source/WebKit2:

Use WTF::pageSize() for the SharedMemory page size.

* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::systemPageSize):

Source/WTF:

Make sure we use the right VM page size on Darwin systems.
On devices where the native page size is 4 KB, it's both
possible and profitable to madvise in smaller chunks.

* wtf/PageBlock.cpp:
(WTF::systemPageSize):


Canonical link: https://commits.webkit.org/172815@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Andreas Kling committed Feb 26, 2016
1 parent b5bc891 commit e23af79083e7710796e82646c501f83c8f02a27a
Showing 4 changed files with 40 additions and 2 deletions.
@@ -1,3 +1,17 @@
2016-02-26 Andreas Kling <akling@apple.com>

[Darwin] Use vm_kernel_page_size for WTF::pageSize().
<https://webkit.org/b/154726>

Reviewed by Antti Koivisto.

Make sure we use the right VM page size on Darwin systems.
On devices where the native page size is 4 KB, it's both
possible and profitable to madvise in smaller chunks.

* wtf/PageBlock.cpp:
(WTF::systemPageSize):

2016-02-25 Gavin Barraclough <barraclough@apple.com>

Replace RefCounter::Token implementation with RefPtr
@@ -26,6 +26,10 @@
#include "config.h"
#include "PageBlock.h"

#if OS(DARWIN)
#include <mach/vm_page_size.h>
#endif

#if OS(UNIX)
#include <unistd.h>
#endif
@@ -40,7 +44,14 @@ namespace WTF {
static size_t s_pageSize;
static size_t s_pageMask;

#if OS(UNIX)
#if OS(DARWIN)

inline size_t systemPageSize()
{
return vm_kernel_page_size;
}

#elif OS(UNIX)

inline size_t systemPageSize()
{
@@ -1,3 +1,15 @@
2016-02-26 Andreas Kling <akling@apple.com>

[Darwin] Use vm_kernel_page_size for WTF::pageSize().
<https://webkit.org/b/154726>

Reviewed by Antti Koivisto.

Use WTF::pageSize() for the SharedMemory page size.

* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::systemPageSize):

2016-02-25 Ryuan Choi <ryuan.choi@navercorp.com>

[EFL] Remove WebUIPopupMenuClient
@@ -35,6 +35,7 @@
#include <mach/mach_error.h>
#include <mach/mach_port.h>
#include <mach/vm_map.h>
#include <wtf/PageBlock.h>
#include <wtf/RefPtr.h>

namespace WebKit {
@@ -217,7 +218,7 @@ bool SharedMemory::createHandle(Handle& handle, Protection protection)

unsigned SharedMemory::systemPageSize()
{
return vm_page_size;
return WTF::pageSize();
}

WebCore::MachSendRight SharedMemory::createSendRight(Protection protection) const

0 comments on commit e23af79

Please sign in to comment.