Squirrel wrote:After loading bmp image of size 640x3072 by calling:
application takes 9Mb RAM memory. Is that normal?
I mean 640*3072/1024/1024 == 1,86Mb. Have I missed something?
Actually, it's 640*372*2, since each pixel is 2 bytes (16bit color). That equals 3,932,160 bytes, which is closer to 4 megs. But you've also got to remember that it loads the image, then copies it into a Surface object, then frees the original memory, so for a moment it's in the memory twice. So, that memory that it freed is most likely still allocated/available to the application, but it's really only using the 4megs for the Surface.