Giter VIP home page Giter VIP logo

Comments (5)

Martinsos avatar Martinsos commented on July 30, 2024

Ah yes, good catch, thanks! I didnt do validation of input parameters yet, but I should certainly do it.
I usually do not check if malloc pointer is NULL, how likely is that to happen? Is that something that is usually handled?

from edlib.

Martinsos avatar Martinsos commented on July 30, 2024

This one will be handled by #38

from edlib.

isovic avatar isovic commented on July 30, 2024

I usually do not check if malloc pointer is NULL, how likely is that to happen?

I think it is always a good practice, though if you are allocating small chunks of memory it is very unlikely you won't be able to actually get it. But since your library could potentially consume huge amounts of space, I think it would be prudent.

E.g. As from one of the previous examples I've sent you, even on relatively small input sizes (e.g. query sequence of length 30k) the memory consumption gets up to 100MB if alignment reconstruction was requested. Imagine if I was to run it with even a larger query sequence, and perform that in parallel on several cores. I feel you could get in the ball park of available free memory on a normal (not very-high end) laptop.

from edlib.

Martinsos avatar Martinsos commented on July 30, 2024

That is true! Ok, I will certainly takecare of that at some moment soon,
thanks
On Feb 8, 2015 8:41 AM, "Ivan Sovic" [email protected] wrote:

I usually do not check if malloc pointer is NULL, how likely is that to
happen?

I think it is always a good practice, though if you are allocating small
chunks of memory it is very unlikely you won't be able to actually get it.
But since your library could potentially consume huge amounts of space, I
think it would be prudent.

E.g. As from one of the previous examples I've sent you, even on
relatively small input sizes (e.g. query sequence of length 30k) the
memory consumption gets up to 100MB if alignment reconstruction was
requested. Imagine if I was to run it with even a larger query sequence,
and perform that in parallel on several cores. I feel you could get in the
ball park of available free memory on a normal (not very-high end) laptop.


Reply to this email directly or view it on GitHub
#37 (comment).

from edlib.

Martinsos avatar Martinsos commented on July 30, 2024

Note: checking if memory was allocated is not such a big issue anymore, since we do not consumer large amount of memory any more (thanks to hirschbergs algorithm).

from edlib.

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.