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

Remove critical section hooks to enhance MISRA conformance #4

Closed pavel-kirienko closed 2 years ago

pavel-kirienko commented 3 years ago

Remove critical section enter/leave hooks:

https://github.com/pavel-kirienko/o1heap/blob/bd9327732b43ec84d5e44b90f343157ae3240d75/o1heap/o1heap.h#L98-L99

Equivalent behaviors can be implemented by wrapping library calls in custom user code instead.

jrahlf commented 2 years ago

The README should be changed accordingly, currently it says

In the case of concurrent environments, also pass pointers to the synchronization locking/unlocking functions -- they will be invoked by the library to facilitate atomic transactions. Alternatively, some applications (where possible) might benefit from using a separate heap per thread to avoid the synchronization overhead and reduce contention.

pavel-kirienko commented 2 years ago

@jrahlf thanks! Fixed in #10