Re: waste of RAM/bug in render.c?

Wolfgang Spraul <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.core
Organization Q AG
Message-ID <[email protected]>
> My question was about the 'length' calculation in lines 2031-2047.
Sorry, I got confused with all the numbers...
The lines I'm talking about are magick/render.s:2731-2747:

    alpha=bounds.x2-bounds.x1;
    beta=bounds.y2-bounds.y1;
    radius=sqrt(alpha*alpha+beta*beta);
    length=(size_t) (2*ceil(MagickPI*radius)+6*BezierQuantum+360);
    if (i >= (long) (number_points-length))
      {
        number_points+=length;
        MagickReallocMemory(primitive_info,
          number_points*sizeof(PrimitiveInfo));
        if (primitive_info == (PrimitiveInfo *) NULL)
          {
            ThrowException3(&image->exception,ResourceLimitError,
              MemoryAllocationFailed,UnableToDrawOnImage);
            break;
          }
      }

Wolfgang



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.