Mail Archives: djgpp/1997/07/20/09:21:36
Please Help.
I am trying to dynamically allocate memory for a buffer. I wrote a
header file that loads and displays pcx files. I need to use a buffer
for the decompressed image.
I'm using code like this:
unsigned char *imagebuffer;
imagebuffer = (unsigned char *)malloc(bufsize);
if (imagebuffer == NULL)
{
`error_handler(NOT_ENOUGH_MEM);
}
It always exits with a "Not enough memory" error.
Any help would be appreciated.
--
-Begin Signature-
Isaac Waldron <waldroni AT lr DOT net> N1YZI
http://www.geocities.com/SiliconValley/Lakes/5703/home.html
-End Signature-
- Raw text -