--- Modules/fcntlmodule.c 2011-11-02 15:56:19.000000000 +0000 +++ /Users/alex/Downloads/modified/Python-2.6.7/Modules/fcntlmodule.c 2011-11-02 16:00:31.000000000 +0000 @@ -534,6 +534,12 @@ #ifdef F_FULLFSYNC if (ins(d, "F_FULLFSYNC", (long)F_FULLFSYNC)) return -1; #endif +/* OS X defaults to caching files as 'inactive memory' for large files + * this can result in significantly degraded system performance, F_NOCACHE + * allows control over whether data caching is enabled/disabled. */ +#ifdef F_NOCACHE + if (ins(d, "F_NOCACHE", (long)F_NOCACHE)) return -1; +#endif /* For F_{GET|SET}FL */ #ifdef FD_CLOEXEC