pavel-kirienko / o1heap

Constant-complexity deterministic memory allocator (heap) for hard real-time high-integrity embedded systems. There is very little activity because the project is finished and does not require further changes.
MIT License
245 stars 26 forks source link

Feature request: memalign allocation. #13

Open tuanhtrng opened 2 years ago

tuanhtrng commented 2 years ago

Is it possible to implement O(1) memalign?

pavel-kirienko commented 2 years ago

I see two solutions immediately (there may be other, less apparent solutions):

thirtytwobits commented 1 year ago

I'd like to see a solution where o1heapAllocateOveraligned(O1HeapInstance* const handle, const size_t amount, const size_t alignment) is added to o1heap such that the user doesn't have to implement a pointer mapping scheme outside of o1heap.