C++ templates to avoid heap fragmentation
This version was contributed by lathoub in PR #17. The changes
- avoid using free/malloc as it causes heap fragmentation and crashes long term when repeatedly calling constructor/destructor (this modif avoids that),
- use
uint8_t
in stead ofint
(saving memory), - use
bitSet
andbitClear
functions instead of performing the bit manipulation manually.