tfhe / spqlios-arithmetic

spqlios arithmetic library for FHE and post-quantum crypto
Apache License 2.0
13 stars 0 forks source link

changes for spqlios-allocators #33

Closed mshih-sb closed 2 months ago

mshih-sb commented 2 months ago

For issue: https://github.com/tfhe/spqlios-arithmetic/issues/30 (resolves #30)

in addition, made changes for: " In addition to the issue, ideally, we could have a _spqlios_alloc(size) and _spqlios_free(ptr) macros defined in common-private.h that we are going to use everywhere in new_xxx/delete_xxx functions. On linux, in release mode, thes functions can just call aligned_alloc on a 64b alignment and free. In debug mode, we can have them point to custom functions like spqlios_debug_alloc(size) => malloc(size+64) + 64 and spqlios_debug_free(ptr) => free(ptr - 64) that will help us track down any wrong usage. "