1
0
mirror of https://github.com/pgvector/pgvector.git synced 2026-10-23 10:48:54 +03:00

Switched to memset [skip ci]

This commit is contained in:
Andrew Kane
2026-10-21 20:40:29 -07:00
parent 548f6fcfd3
commit 93056e5b31
3 changed files with 4 additions and 4 deletions

View File

@@ -178,7 +178,7 @@ CreateGraphPages(HnswBuildState * buildstate)
iter = element->next;
/* Zero memory for each element */
MemSet(etup, 0, HNSW_TUPLE_ALLOC_SIZE);
memset(etup, 0, HNSW_TUPLE_ALLOC_SIZE);
/* Calculate sizes */
etupSize = HNSW_ELEMENT_TUPLE_SIZE(VARSIZE_ANY(valuePtr));
@@ -266,7 +266,7 @@ WriteNeighborTuples(HnswBuildState * buildstate)
iter = element->next;
/* Zero memory for each element */
MemSet(ntup, 0, HNSW_TUPLE_ALLOC_SIZE);
memset(ntup, 0, HNSW_TUPLE_ALLOC_SIZE);
/* Can take a while, so ensure we can interrupt */
/* Needs to be called when no buffer locks are held */

View File

@@ -249,7 +249,7 @@ RepairGraphElement(HnswVacuumState * vacuumstate, HnswElement element, HnswEleme
HnswFindElementNeighbors(base, element, entryPoint, index, support, m, efConstruction, true);
/* Zero memory for each element */
MemSet(ntup, 0, HNSW_TUPLE_ALLOC_SIZE);
memset(ntup, 0, HNSW_TUPLE_ALLOC_SIZE);
/* Update neighbor tuple */
/* Do this before getting page to minimize locking */

View File

@@ -523,7 +523,7 @@ CreateListPages(Relation index, VectorArray centers, int lists,
OffsetNumber offno;
/* Zero memory for each list */
MemSet(list, 0, listSize);
memset(list, 0, listSize);
/* Load list */
list->startPage = InvalidBlockNumber;