3 ms·
Can you elaborate on the tagging scheme? I'm not sure if the tag is stored in the high bits or low bits of the data pointer. If it's the low bits, how does it i
by ridiculous_fish 5y ago
Can you elaborate on the tagging scheme? I'm not sure if the tag is stored in the high bits or low bits of the data pointer. If it's the low bits, how does it interact with the VUE repr, whose pointers are char-aligned (that is, unaligned)?
- lifthrasiir 5y agoIt seems that the tag is in the low bits, and for VUE displaced low bits are stored in the offset field instead.
- jws 5y agoDefinitely low bits: #define DATA(buf) ((char*)((intptr_t)((buf)->data) << BFT_TYPE_BITS)) Older programmers tend to raise an eyebrow at added computation like the "<<", but here in 2022 we need to remember that we are about to do a memory access and even if it's in L1 cache, that "<<" is basically free by comparison.
- TickleSteve 5y agoMost microcontrollers do not have cache of this form (rather a simple read-ahead buffer at most). Microcontrollers are also one of the targets of this type of library and the shift absolutely will have an effect.