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 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 employs a similar feature known as "hibernation", but without keeping RAM powered on.