aboutsummaryrefslogtreecommitdiff
path: root/sftsr.h
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-30 13:43:03 +0200
committerJavier <dev.git@javispedro.com>2022-04-30 13:43:03 +0200
commit11d69ee443a869740102d53eb292598c8d159ff6 (patch)
tree66c7a7bf6d63afe3a58c4e4ba85b34b5bc69a7c9 /sftsr.h
parent7f2b85a2131718fd39b49737a5d945fb3ae7bde7 (diff)
downloadvbados-11d69ee443a869740102d53eb292598c8d159ff6.tar.gz
vbados-11d69ee443a869740102d53eb292598c8d159ff6.zip
add hack to make filemgr stop leaking dir handles
Diffstat (limited to 'sftsr.h')
-rw-r--r--sftsr.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sftsr.h b/sftsr.h
index 52e86f3..9b254f7 100644
--- a/sftsr.h
+++ b/sftsr.h
@@ -32,7 +32,7 @@
#define LASTDRIVE 'Z'
#define NUM_DRIVES ((LASTDRIVE - 'A') + 1)
-/** Maximum number of open files */
+/** Maximum number of open files and open directories (being enumerated). */
#define NUM_FILES 60
/** Parameters used for returning disk geometry.
@@ -51,6 +51,10 @@ typedef struct {
uint32_t root;
uint64_t handle;
} OPENFILE;
+// TODO: Technically we could reduce the size of the above struct to save a bit of mem
+// In the current implementation the max handle virtualbox can give is < 4K,
+// but we still waste a full uint64_t to store a value that is always < 4K.
+// Similarly, at most 64 roots are supported, but we waste a uint32_t.
typedef struct {
// TSR installation data