[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer ove
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #46417] GL2PS info: OpenGL feedback buffer overflow when printing |
Date: |
Sat, 02 Jan 2016 18:28:03 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1) |
Follow-up Comment #20, bug #46417 (project octave):
@Panxto: I think you're correct that the starting buffer size of 1MB is way
too small. How about a starting size of 4MB?
Another question is whether the buffer size should grow linearly or
exponentially? If the first round fails at 4MB is it really likely to succed
at 5 MB? or should we be increasing by a scale factor like 1.5 or 2 each time
through the loop? From my earlier experiments, a pcolor plot requires a fixed
75 bytes per pixel. Given that this is a 2-D image, a linear growth in the
length of a side of the image requires a squared growth in memory
requirements. If we change the code to
buffsize *= 2;
Then Octave will be growing linearly in image size. I think this will also
help the underlying malloc() call to have memory requirements that are aligned
to powers of 2.
To make it concrete,
starting_img_size = sqrt ((4 * 1024 * 1024) / 75) = 236 x 236
img_size_1 = sqrt ((8 * 1024 * 1024) / 75) = 334 x 334
img_size_2 = sqrt ((16 * 1024 * 1024) / 75) = 473 x 473
img_size_3 = sqrt ((32 * 1024 * 1024) / 75) = 669 x 669
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46417>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/