Fix alignment bug in llama.com

This commit is contained in:
Justine Tunney 2023-05-10 06:15:32 -07:00
parent ca990ef091
commit 6cb9553706
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 10 additions and 7 deletions

View file

@ -377,13 +377,13 @@ struct llama_buffer {
size_t size = 0;
void resize(size_t size) {
delete[] addr;
addr = new uint8_t[size];
free(addr);
addr = (uint8_t *)memalign(32, size);
this->size = size;
}
~llama_buffer() {
delete[] addr;
free(addr);
}
};
#endif