Was ist der Zweck des flag MAP_ANONYMOUS in mmap-Systemaufruf?

Aus der man Seite,

MAP_ANONYMOUS
              The mapping is not backed by any file; its contents are initialized to zero.  The fd and offset arguments are ignored; however, some implementations  require
              fd  to  be  -1  if  MAP_ANONYMOUS  (or  MAP_ANON)  is  specified, and portable applications should ensure this.  The use of MAP_ANONYMOUS in conjunction with
              MAP_SHARED is only supported on Linux since kernel 2.4.

Was ist der Zweck der Verwendung MAP_ANONYMOUS? Jedes Beispiel, das wäre gut. Auch Von wo der Speicher gemappt werden?

Es ist geschrieben auf man Seite, die The use of MAP_ANONYMOUS in conjunction with MAP_SHARED is only supported on Linux since kernel 2.4.
Wie kann ich die memory-mapped mit MAP_ANONYMOUS mit anderen Verfahren?

InformationsquelleAutor GeekyJ | 2015-12-02
Schreibe einen Kommentar