Friday, January 7, 2011

Differential Reference Counting

Just published an article on Differential Reference Counting - reference counting algorithm which provides strong thread-safety and permits useful use cases that are not permitted by plain atomic reference counting (like boost::shared_ptr).


  1. I guess this is not correct way to use the smart pointer.
    This does not differ from the variant with a regular global pointer, without any reference counting at all.

    T * ptr;

    // thread 1
    ptr->SomeMethod(); //The problem is the same - who is freeing it at this time?

    To use it properly, we have to increment the reference counter safely in the thread, who is already an owner of the resource :

    // thread 1
    shared_ptr ptr(new T);
    // now this thread is a sole owner of the resource

    // lets share it with another thread.
    shared_ptr ptr2 = ptr;// The counter was incremented in this thread - nobody could free it.

    CreateThreadWithContext(Thread2Func, ptr.get());

    // thread 2
    void Thread2Func(T * p)
    shared_ptr ptr(p, false);// false means NOT to increment reference counter again

    ptr->SomeMethod();// You can use it safely, You are already an owner, nobody can free it.

    }// destructor of shared_ptr decrement reference counter, and free the resource, if this thread is its last owner.

    It may be enough for safe life-time management.

    But your idea is interesting as a access point to some resource.

    1. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Project Centers in Chennai for CSE.

      Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
      Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

  2. > I guess this is not correct way to use the smart pointer.

    It's an incorrect way to use a reference counting algorithm, if it does not support such usage. However, if it does support such usage, then it's a correct usage.
    Btw, smart pointers are no more than a syntactic sugar.

  3. Students, this blog post will help you make a right college packing list to move to the dorm.

  4. เกมออนไลน์ แจกเครดิตฟรี slot online คลิกเลย


  5. How do you clean a fabric sofa?

    How much does it cost to have a sofa cleaned?

    How do you clean a sofa?

    Can you get a couch professionally cleaned?

    شركة تنظيف كنب بمكة بالبخار

    شركة تنظيف كنب بمكة بالبخار

  6. Charlie Hunnam sons of anarchy vest is an ideal vest for Bikers if you are willing to impress the viewers. SHOP NOW!

  7. You are one straightforward writer for this. And get tok know about Subway Surfers download now!

  8. Browse all Instagram on the web, Instagram web viewer online, Picks the most popular hashtag and interesting users and story on Instagram viewer.

  9. great stuff looking forward more content
    zara 4p analysis

  10. If you are looking expert in assignment then hire our experts Assignment help

  11. There are a great number of absolutely uncountable dating sites all over the globe, all are monotonous and there is very hard time seeking love. I have paid little interest whatsoever to these pages, I always assumed that these sites were just a hoax and it was difficult to find love. However, I was happily shocked when I sought such a fantastic service as ukrainian mail order brides. It was really simple to choose a girl so all of them were on the website and the staff helped me choose the girl that was just the one I wanted!

  12. The research that combines biological sciences and statistics is biostatistics. In different biological sciences, statistical techniques are applied, including biological laboratory studies, medical research, health care, epidemiology, etc. Statistics is one of the best research that can be applied to data collection, summarization, and interpretation in biological science. In biological sciences, mathematical application has had an enormous effect on how genes are studied. We are at assignment help . Assignment helps under our Biostatistics assignment help so that students can complete their assignment on time and score good marks.

  13. We provide online quiz help answers to school, high school, college and university students. Our experts are accustomed to using multiple quiz portal platforms such as blackboard, canvas and modal. We have hired experts from various fields of education. So that you can give us an online quiz support service on your required services. Experts know how to solve explanatory questions and objective type questions. They will finish your quiz or exam on time.

    Online Quiz

  14. ● Expert Writer: The reason for this is that the Saudi expert has faced a similar situation while completing his degree. Given this special advantage of local authors, our goal is to prioritize hiring local authors from Assignment Help in Saudi Arabia. This allows us to meet the expectations of better students than our competitors.
    Assignment Help in Saudi Arabia

  15. A citation machine can be defined as a tool that one can use to create accurate references. This type of tool is highly effective in generating references using all the different styles. One will get references for both in-text and the referencing list. Usually, these tools come for free and can generate citations for different types of documents. The citations created by this tool help one in presenting all the sources properly that have been used in a task. By including correctly created references in a paper, one avoids the risk of plagiarism. The tools are also very easy to use, which gives the users a hassle-free way to generate accurate citations. We are at Citation machine assignment help critical homework help give online Citation machine assignment help with the goal that students can finish their assignment on schedule and secure good marks.