mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-02 18:50:56 +08:00
Fixed invalid memory alloc request size error - fixes #43
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## 0.3.2 (unreleased)
|
||||
|
||||
- Fixed `invalid memory alloc request size` error
|
||||
|
||||
## 0.3.1 (2022-11-02)
|
||||
|
||||
If upgrading from 0.2.7 or 0.3.0, [recreate](https://github.com/pgvector/pgvector#031) all `ivfflat` indexes after upgrading to ensure all data is indexed.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user