mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 22:33:05 -07:00
Debug memory alloc
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user