Subject: Re: [boost] [lockfree] tagged_ptr as a separate library
From: Hite, Christopher (Christopher.Hite_at_[hidden])
Date: 2012-04-12 11:24:59
> > Isn't tagged_ptr also useful even when it is not used atomically?
> i've personally not seen any use case for a tagged pointer except for prevention of the ABA problem. especially the pointer-compression is mainly to pack pointer and tag into a 64bit memory region, which is mainly required for systems without 128bit compare-and-swap ...
I've heard of the JVM running in 64bit memory model, but compressing pointers into 32bits by taking advantage of word alignment and most of the address space starting around 0. It means they can access ~32GB memory while not having the memory footprint of all pointers double.
The assumptions you need for your tagged pointer sound about the same.
I could also imagine someone using 16-bit pointers to keep dynamic data structures in 64kB of LD1 cache.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk