10000 Use Size for memory [skip ci] · postgrespro/pgvector@658d74e · GitHub
[go: up one dir, main page]

Skip to content

Commit 658d74e

Browse files
committed
Use Size for memory [skip ci]
1 parent 7ba593c commit 658d74e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/hnsw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ typedef struct HnswGraph
185185

186186
/* Allocations state */
187187
LWLock allocatorLock;
188-
long memoryUsed;
189-
long memoryTotal;
188+
Size memoryUsed;
189+
Size memoryTotal;
190190

191191
/* Flushed state */
192192
LWLock flushLock;

src/hnswbuild.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ BuildCallback(Relation index, ItemPointer tid, Datum *values,
607607
* Initialize the graph
608608
*/
609609
static void
610-
InitGraph(HnswGraph * graph, char *base, long memoryTotal)
610+
InitGraph(HnswGraph * graph, char *base, Size memoryTotal)
611611
{
612612
/* Initialize the lock tranche if needed */
613613
HnswInitLockTranche();
@@ -708,7 +708,7 @@ InitBuildState(HnswBuildState * buildstate, Relation heap, Relation index, Index
708708
buildstate->normprocinfo = HnswOptionalProcInfo(index, HNSW_NORM_PROC);
709709
buildstate->collation = index->rd_indcollation[0];
710710

711-
InitGraph(&buildstate->graphData, NULL, maintenance_work_mem * 1024L);
711+
InitGraph(&buildstate->graphData, NULL, (Size) maintenance_work_mem * 1024L);
712712
buildstate->graph = &buildstate->graphData;
713713
buildstate->ml = HnswGetMl(buildstate->m);
714714
buildstate->maxLevel = HnswGetMaxLevel(buildstate->m);

0 commit comments

Comments
 (0)
0