又查了一下,10.8.2之后需要lock一个空sleepimage来防止自动创建。
https://discussions.apple.com/thread/4492672?start=0&tstart=0Ok so I managed to solve my problem. Basically, I couldn't prevent the sleepimage to rebuilt even though my hibernate mode is set to 0, I don't know why but now my sleepimage weights 0 byte instead of 8 gigs. Here's the deal :
First, disable hibernation mode :
sudo pmset -a hibernatemode 0
delete /private/var/vm/sleepimage :
sudo rm /private/var/vm/sleepimage
create an empty file and name it 'sleepimage' :
touch /private/var/vm/sleepimage
change his flag to immuable :
chflags -uchg /private/var/vm/sleepimage
That's it ! Now, OS X won't be able to rebuilt over your sleepimage file since it is locked. This one worked for me, hope it'll work for those who encounter the same problem as mine.