ram

PlayStation 4 reserves 3.5GB of its 8GB GDDR5 memory for the operating system, leaving 4.5GB of space for game code, according to current PlayStation 4 documentation shown to Digital Foundry by a well-placed development source. However, further sources suggest that an additional 1GB of "flexible memory" may be reclaimed from the OS reservation, based on availability. Read the entire story at Eurogamer.

In summary:
Xbox One = 3GB OS and 5GB for games.
Playstation 4 = 3.5GB OS and 4.5-5.5GB for games because of "flexible" memory.