Skip to content

How does this library handle bool type variables? #24

Answered by rlogiacco
skleeschulte asked this question in Q&A
Discussion options

You must be logged in to vote

The library doesn't do any particular optimization on a per data-type basis, in other words the occupied memory is n * sizeOf(dataType) where n is the circular buffer size and sizeOf(dataType) is the memory occupation for a particular data type. On certain architectures, a byte actually occupies 4 bytes and in practically any architecture I know a bool takes an entire byte.

If you have the need for bit manipulation you need a specialized implementation which, if done properly, is going to be a welcome addition 😉

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rlogiacco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #24 on December 12, 2020 14:20.