Subject: Re: [boost] [lockfree] tagged_ptr as a separate library
From: Tim Blechmann (tim_at_[hidden])
Date: 2012-04-12 12:08:01
>>> 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.
i suppose the main difference is that c++ runs on a real machine, while
java runs on a virtual machine?
> 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.
in a way this converts pointers to indices ... i am using this technique
under certain circumstances, but it does not work for dynamically
growing data structures ...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk