Safe sleep

Safe sleep, sometimes referred to as deep sleep, is a feature introduced in Mac OS X 10.4.3 to back up the user's work on battery-powered portable Macs released since late 2005. The feature supposedly existed since Mac OS X 10.3 for systems built since September 2003, but it was not enabled by default in models with PowerPC processors; it does not support G5 processors.

Description
In models that support the safe sleep feature, every time the Mac goes to sleep, the current state of the computer is saved to the drive, including all open applications and documents. Free drive space must match the amount of RAM being used. If the battery is depleted or replaced while the computer is in safe sleep, the next time it is turned on, instead of re-booting, the previous state of the computer will be loaded from the sleepimage file; a low-resolution grayscale screenshot of the desktop is displayed with a progress bar until this process has completed. It is also possible to enable and disable this mode manually through Terminal.

MacBooks with solid-state drive (SSD) storage utilize a similar feature known as standby mode in which the contents of RAM are written to the non-volatile SSD, and then the RAM is powered down after an hour of sleep. Models released since 2013 do this after 3 hours of sleep. This enables a MacBook on standby to retain its battery charge for much longer — as much as 30 days.

Windows equivalents
A similar feature to "safe sleep" in Windows is called "hybrid sleep", which is enabled primarily for desktop PCs and disabled by default on laptop PCs at the request of PC manufacturers due concerns of the vulnerability of portable hard disk drives. Recent Windows laptops instead normally keep RAM powered on in sleep mode to reduce I/O burden at the cost of battery life. Older laptop PCs, or laptop PCs in lower-power situations, will employ another feature known as "hibernation", which is more similar to the "standby mode" used by MacBooks, though with a performance hit when an SSD is not available.