Hi, Jilong,

Just added code to make use of std::atomic template when it is
available.  This should address your concern about unlocked read in
ibis::util::sharedInt64.  You can download the latest source code with

svn checkout https://codeforge.lbl.gov/anonscm/fastbit


Feel free to let us know if you have any other suggestions or comments.

Thanks.

John




On 4/23/15 4:02 AM, wang jilong wrote:
> Hi John,
> 
> A. As of fastbit 1.3.8, class sharedInt64 in util.h, is implemented with 
> multi-thread-synchronized, on all write-operators (++, +=, +-, --).
> However, the read-operator ()  is not synchronized. 
> 
> B. ibis::fileManager::totalBytes is a sharedInt64 object. It is used in the 
> constructor ibis::fileManager::storage::storage(size_t n).
> 
> C. The method "ibis::array_t<T>::reserve(size_t n)" uses 
> ibis::fileManager::storage::storage(...).
> 
> D. It seems to me that could lead to allocating more memory than 
> ibis::fileManager::maxBytes. Is it potentially risky?
> 
> E. C++ is very tricky to me, and have not touched for a while, So forgive me 
> if I made obvious error above.
> 
> (BTW, I am working on a mysterious crash related to JNI around fastbit 1.3.8. 
> I found crashes around "ibis::array_t<T>::reserve(size_t n)")
> 
> Thanks
> 
> Jilong Wang
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to