Debug memory alloc

This commit is contained in:
jacob314
2026-03-19 11:30:58 -07:00
parent 4e5dfd0cb7
commit a09f6b40ff
+8
View File
@@ -419,6 +419,14 @@ export async function main() {
}
}
if (settings.merged.advanced.autoConfigureMemory) {
const heapStats = v8.getHeapStatistics();
const currentMaxOldSpaceSizeMb = Math.floor(
heapStats.heap_size_limit / 1024 / 1024,
);
writeToStderr(`Allocated memory: ${currentMaxOldSpaceSizeMb} MB\n`);
}
// We are now past the logic handling potentially launching a child process
// to run Gemini CLI. It is now safe to perform expensive initialization that
// may have side effects.