- 论坛徽章:
- 0
|
/dev/zero中的zero是什么意思?
[quote]原帖由 "hnwjg"]不明白的,请老手指教![/quote 发表:
from http://mkssoftware.com/docs/man5/dev_zero.5.asp
/dev/zero
zero special file
Device
SYNOPSIS DESCRIPTION AVAILABILITY SEE ALSO
--------------------------------------------------------------------------------
SYNOPSIS
/dev/zero
--------------------------------------------------------------------------------
DESCRIPTION
The zero special file is a source of zeroed memory.
Reads from a zero special file always return a buffer full of zeroes. The file is of infinite length. Writes to a zero special file are always successful, but the data written is ignored.
Mapping a zero special file creates a zero-initialized memory object of length equal to the length of the mapping and rounded up to the nearest allocation boundary as returned by sysconf(_SC_NUTC_OS_ALLOCGRANULARITY). Multiple processes can share such a zero special file object provided a common ancestor mapped the object MAP_SHARED.
--------------------------------------------------------------------------------
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
--------------------------------------------------------------------------------
SEE ALSO
Functions:
mmap(), sysconf() |
|