pread_cache.c: a cache to map pread() calls to fread() to prevent small
reads on MacOSX network filesystems that don't do block cacheing
+ This is useful for Maya, which does very small reads (often 2 bytes or 4 bytes)
+ which when used with smbfs on MacOSX gives extremely poor performance.
+
tridge@samba.org January 2008
released under GNU GPLv3 or later
to compile on MacOSX:
- gcc pread.c -Wall -g -o pread.dylib -dynamiclib
+ gcc pread_cache.c -Wall -g -o pread_cache.dylib -dynamiclib
usage:
- DYLD_INSERT_LIBRARIES=/Users/tridge/pread.dylib DYLD_FORCE_FLAT_NAMESPACE=1 command
+ DYLD_INSERT_LIBRARIES=$PWD/pread_cache.dylib DYLD_FORCE_FLAT_NAMESPACE=1 command
*/
#include <sys/types.h>