Fixed invalid memory alloc request size error - fixes #43

This commit is contained in:
Andrew Kane
2022-11-17 14:12:49 -08:00
parent b7c5849ba7
commit ccec96ba54
2 changed files with 5 additions and 1 deletions

View File

@@ -10,7 +10,7 @@
VectorArray
VectorArrayInit(int maxlen, int dimensions)
{
VectorArray res = palloc0(VECTOR_ARRAY_SIZE(maxlen, dimensions));
VectorArray res = palloc_extended(VECTOR_ARRAY_SIZE(maxlen, dimensions), MCXT_ALLOC_ZERO | MCXT_ALLOC_HUGE);
res->length = 0;
res->maxlen = maxlen;