diff --git a/src/gausskernel/storage/access/datavec/ivfkmeans.cpp b/src/gausskernel/storage/access/datavec/ivfkmeans.cpp index c07f7c5122bd5f1dd10a173830f0caea39533ebb..2538a62c1631e93841d211eb9eb1c017622c19eb 100644 --- a/src/gausskernel/storage/access/datavec/ivfkmeans.cpp +++ b/src/gausskernel/storage/access/datavec/ivfkmeans.cpp @@ -325,7 +325,7 @@ static void ElkanKmeans(Relation index, VectorArray samples, VectorArray centers lowerBound = (float *)MemoryContextAllocExtended(CurrentMemoryContext, lowerBoundSize, MCXT_ALLOC_HUGE); upperBound = (float *)palloc(upperBoundSize); s = (float *)palloc(sSize); - halfcdist = (float *)palloc_extended(halfcdistSize, MCXT_ALLOC_HUGE); + halfcdist = (float *)MemoryContextAllocExtended(CurrentMemoryContext, halfcdistSize, MCXT_ALLOC_HUGE); newcdist = (float *)palloc(newcdistSize); /* Initialize new centers */