Thread Ungepufferte Ausgabe in C (10 answers)
Opened by J-jayz-Z at 2005-07-05 00:39

ptk
 2006-05-03 09:40
#11237 #11237
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
[quote=murphy,03.05.2006, 06:24]* fcntl ist eine low-level Funktion, die mit Pufferung gar nichts zu tun hat und obendrein extrem unportabel ist. Bei einigen Betriebssystemen kann man allerdings über fcntl-Aufrufe das Caching auf Kernellevel für eine Datei deaktivieren oder eine Synchronisation des Dateisystemes erzwingen.[/quote]
Zum Beispiel bei BSD. Aus der Manpage:
Code: (dl )
1
2
3
4
5
6
     O_DIRECT     Minimize or eliminate the cache effects of reading and writ-
ing. The system will attempt to avoid caching the data you
read or write. If it cannot avoid caching the data, it will
minimize the impact the data has on the cache. Use of this
flag can drastically reduce performance if not used with
care.

View full thread Ungepufferte Ausgabe in C