mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-16 17:32:17 +08:00
Added extra 5% to memory estimate
This commit is contained in:
@@ -369,7 +369,8 @@ HnswElementMemory(HnswElement e, int m)
|
|||||||
elementSize += VARSIZE_ANY(DatumGetPointer(e->value));
|
elementSize += VARSIZE_ANY(DatumGetPointer(e->value));
|
||||||
/* Each allocation has a chunk header */
|
/* Each allocation has a chunk header */
|
||||||
elementSize += (e->level + 7) * GENERATIONCHUNK_RAWSIZE;
|
elementSize += (e->level + 7) * GENERATIONCHUNK_RAWSIZE;
|
||||||
return elementSize;
|
/* Add an extra 5% for alignment and other overhead */
|
||||||
|
return elementSize * 1.05;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user