]> git.saurik.com Git - apple/libc.git/blobdiff - gen/FreeBSD/telldir.h
Libc-1439.100.3.tar.gz
[apple/libc.git] / gen / FreeBSD / telldir.h
index 271981eba39ef130d7878d18032477c6c863e76f..6b7902de37790708ad4b2858ba67f2d06b0e0272 100644 (file)
@@ -67,14 +67,21 @@ struct _telldir {
 #endif /* __DARWIN_64_BIT_INO_T */
 };
 
+/*
+ * This lets paths like `/` or top-level bundles to return in a single
+ * __getdirentries64 while keeping pressure on malloc small.
+ */
+#define READDIR_INITIAL_SIZE  2048
+#define READDIR_LARGE_SIZE    (8 << 10)
+
 #if __DARWIN_64_BIT_INO_T
 size_t         __getdirentries64(int fd, void *buf, size_t bufsize, __darwin_off_t *basep);
 #endif /* __DARWIN_64_BIT_INO_T */
 __attribute__ ((visibility ("hidden")))
 bool           _filldir(DIR *, bool) __DARWIN_INODE64(_filldir);
 struct dirent  *_readdir_unlocked(DIR *, int) __DARWIN_INODE64(_readdir_unlocked);
-void           _reclaim_telldir(DIR *);
-void           _seekdir(DIR *, long) __DARWIN_ALIAS_I(_seekdir);
+void           _reclaim_telldir(DIR *);
+void           _seekdir(DIR *, long) __DARWIN_ALIAS_I(_seekdir);
 __attribute__ ((visibility ("hidden")))
 void        _fixtelldir(DIR *dirp, long oldseek, long oldloc) __DARWIN_INODE64(_fixtelldir);
 long           telldir(DIR *) __DARWIN_ALIAS_I(telldir);