We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 049417e commit 8a67662Copy full SHA for 8a67662
src/backends/onnxruntime.c
@@ -35,12 +35,12 @@ const OrtMemoryInfo *AllocatorInfo(const OrtAllocator *allocator) {
35
void *AllocatorAlloc(OrtAllocator *ptr, size_t size) {
36
37
(void)ptr;
38
- int offset = 31 + sizeof(void *);
+ int offset = 63 + sizeof(void *);
39
void *p1 = (void *)RedisModule_Alloc(size + offset);
40
size_t allocated_size = RedisModule_MallocSize(p1);
41
atomic_fetch_add(&OnnxMemory, allocated_size);
42
atomic_fetch_add(&OnnxMemoryAccessCounter, 1);
43
- void **p2 = (void **)(((uintptr_t)(p1) + offset) & (~31));
+ void **p2 = (void **)(((uintptr_t)(p1) + offset) & (~63));
44
p2[-1] = p1;
45
return p2;
46
}
0 commit comments