Gábor Melis wrote:
I understand that at some points keys were aligned to 2 bytes and maybe values, too: https://github.com/AltSysrq/lmdb-zero/issues/8 Maybe that's still the case.
Keys are always aligned to 2 bytes, values will not be aligned if the key length is odd.
In LMDB 1.0 keys and values are always 2-byte aligned (the key gets an extra padding byte if it's odd length).
However a solution I'm looking at needs double word (16 bytes on 64 bit) alignment of values. This would allow using the value directly as a read-only Lisp object. Leaving whether that's a good idea aside, is there any way to guarantee double word alignment of values? My preliminary hacks involving varying the key size were not successful.
Should work if the value size is always 16-byte aligned, and the key size is 24.
Cheers, Gábor Melis