Code Monkey home page Code Monkey logo

Comments (2)

tbarbette avatar tbarbette commented on August 23, 2024

I the freeing behavior is actually true in FastClick. A change (quite undocumented but discussed recently in #101), in FastClick is that we have a pool of packet, and a pool of packet with buffer (while the second in vanilla is a pool of buffer only).
As a result the code of uniqueify has a single allocation that do not depend on the number of references. Later, after the packet+buffer allocation, if we actually did not need the new packet because the use count of original was 1, the new packet is freed.

But that being said, even in vanilla I see a return 0 if either the packet alloc is 0 or the buffer alloc is 0 ?

However, there is still the problem of all code paths not checking if return of uniqueify is null.

from fastclick.

pallas avatar pallas commented on August 23, 2024

from fastclick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.