MacOS X

Snow Leopardでdynamic_pager Off


Snow Leopard 版 Makefileをココか ら拝借しました。

[ Makefile ]
-----
# $Id: Makefile,v 1.1 2008/08/24 21:11:32 dankogai Exp dankogai $
#
# see the URL below!!
#
# http://cestdelamerde.com/archives/22-Killing-Mac-OS-X-Swapping-How-To-Disable-dynamic_pager.html
#

CFLAGS = -no-cpp-precomp -DNO_DIRECT_RPC -framework CoreFoundation \
    -framework IOKit -lSystem.B -R -DNO_DIRECT_RPC dynamic_pager.c \
    -I/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers \
    -I/Developer/SDKs/MacOSX10.6.sdk/usr/include

all:    dynamic_pager

dynamic_pager.c:
    curl -O http://cestdelamerde.com/uploads/dynamic_pager.c

dynamic_pager:    dynamic_pager.c
    cc $(CFLAGS) -o dynamic_pager

clean:
    rm dynamic_pager

install: dynamic_pager
    mv /sbin/dynamic_pager /sbin/dynamic_pager.apple && \
    /bin/cp -p /sbin/dynamic_pager.apple . && \
    install -m 0555 -o root -g wheel dynamic_pager /sbin

uninstall: dynamic_pager.apple
    /bin/chmod +w /sbin/dynamic_pager && \
    /bin/rm -f /sbin/dynamic_pager && \
    /bin/cp -p ./dynamic_pager.apple /sbin/dynamic_pager && \
    /bin/chmod +w ./dynamic_pager.apple && \
    /bin/rm -f ./dynamic_pager.apple
[ EOF ]
-----

あとは Leopard と一緒。

このページの先頭へ