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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user