Problem with GNUPlot's HP Laserjet driver
Greg Montgomery
greg at turbo.atl.ga.us
Mon Sep 17 03:49:12 AEST 1990
I've been trying to include some graphics routines from GNUPlot in a
program I'm writing, but I'm having some problems with the HP driver. I
keep getting an 'out of memory raster buffer' or similar. It's in
the r_makeraster() function. How much memory does this function take up
or does it vary depending on the plot?? In the r_makeraster() routine,
the code where I'm having the problem is:
-------------------
void
r_makeraster(x, y)
unsigned x, y;
{
register unsigned j;
/* allocate row pointers */
r_p = (raster *)alloc(y * sizeof(pixel *), "raster buffer");
bzero(r_p, y * sizeof(pixel *));
for (j = 0; j < y; j++) { /* this is the loop where it bombs */
(*r_p)[j] = (pixel *)alloc(x * sizeof(pixel), "raster buffer");
bzero((*r_p)[j], x * sizeof(pixel));
}
r_xsize = x; r_ysize = y;
r_currx = r_curry = 0;
}
-------------------------------
On the for loop, it will loop about 550 times before running out of
memory. I have even overlaid my program, and this is the best I can
get... Any ideas on this? I've tried to contact the author listed in the
routine (jty at intrin.UUCP), but there isn't a user there named jty...
Thanks greatly...
Greg
----
Greg Montgomery | Montgomery Consultants, Inc. | Atlanta, Georgia
Internet: greg at turbo.atl.ga.us
UUCP: greg at turbo.UUCP or {rutgers,ogcise,gatech}!emory!turbo!greg
More information about the Comp.lang.c
mailing list