Squadrick / shadesmar

Fast C++ IPC using shared memory
MIT License
555 stars 85 forks source link

Memory alignment #59

Closed m1018 closed 2 years ago

m1018 commented 2 years ago

Hello, what are the considerations for the implementation of memory alignment in the code? Hope you can understand, thank you

Squadrick commented 2 years ago

All the memory management (allocation, deallocation and copying) is done using a Copier interface, with the default implementation using malloc, free and memcpy, so no special aligned memory.

You can implement your own Copier which can handle custom aligned memory, and pass that to the library instead.