[SDL] SDL SDLSprite or src/video/SDL_blit_1 bug ?

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Oct 7 15:03:01 PDT 2003


Nuage wrote:

> Hello, I'm using the memorychecker "efence" to debug my programm.
>
> We have checked our program aggain and aggain, and we didin't found
> anything.
> Is efence detecting errors in yours progams too ?
>
> In ours, this happen after reading 1171 image .png without alpha, and
> when we read 33 .png with alpha, then the 34th crashes.

You mean you're loading more than 1000 pictures ?

Electric fence uses two memory pages more for each memory allocation 
than standard memory allocation code does, so each malloc() has a high 
associated cost.
I think you are simply running out of memory somewhere and not checking 
return values.

Stephane






More information about the SDL mailing list