Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gpderetta
· 1y ago · 0 comments
Enough to be able to pack a mutex and a pointer together for example. If you are carefully packing your structs a one byte mutex is great.
Comments
[–]
skitter
1y ago
Yup, that's what I'm doing - storing the two bits needed for an object's monitor in the same word as its compressed class pointer. The pointer doesn't change over the lock's lifetime.