MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / releaseMemory

Method releaseMemory

src/db/index.ts:969–973  ·  view source on GitHub ↗

* Give back what this connection holds only to read faster: its page cache, * and the file mapping, whose touched pages count toward the process until * they are unmapped. The next reads fill both again. It stays the same * connection, so its prepared statements stay, and so do the answers

()

Source from the content-addressed store, hash-verified

967 * remembered against its change stamp.
968 */
969 releaseMemory(): void {
970 this.db.exec('PRAGMA shrink_memory');
971 this.db.pragma('mmap_size = 0');
972 this.db.pragma(`mmap_size = ${MMAP_SIZE_BYTES}`);
973 }
974
975 /**
976 * Close the database connection

Callers 1

releaseIdleMemoryMethod · 0.45

Calls 2

execMethod · 0.65
pragmaMethod · 0.65

Tested by

no test coverage detected