packagefs: Add a fallback buffer for reading heaps in low-memory conditions.

Otherwise we might fail with B_NO_MEMORY, or wait for long periods of
time, which we don't want to do in such a critical routine.

Should improve system responsiveness (or even prevent application
crashes) under high memory pressure.
This commit is contained in:
Augustin Cavalier
2026-02-04 14:59:27 -05:00
parent 685d305a5b
commit dce3a4366d
3 changed files with 19 additions and 4 deletions
@@ -100,6 +100,7 @@ public:
static const size_t kChunkSize = 64 * 1024;
#if defined(_KERNEL_MODE)
static void* sQuadChunkCache;
static void* sQuadChunkFallbackBuffer;
#endif
protected: