Hi,
Please test this code to see how many images can be loaded:
Rem Project: memory usage test
Rem Created: 20/07/2005 11:36:15
Rem ***** Main Source File *****
CREATE BITMAP 1,512,512
GET IMAGE 1, 1, 1, 512, 512, 0
DELETE BITMAP 1
save image "test.bmp", 1
DELETE IMAGE 1
while mouseclick()=0
inc i
cls
set cursor 0,20
print "SYSTEM SMEM AVAILABLE = ", SYSTEM SMEM AVAILABLE()
print "next image = ", i
load image "test.bmp", i : rem add ,1 at the end for load without mipmapping
print "loaded, ", i
sync
EXIT PROMPT "TOTAL LOADED = "+str$(i), "END OF MEMORY TEST"
endwhile
It creates an image, saves it to disk, and try to load it as many times as it can. Add ",1" at the end of the "load image" command, to turn off mipmapping.
My numbers:
171 512x512 images loaded with mipmapping
1682 512x512 images loaded withOUT mipmapping
So, as you can see, the amount of images that can be loaded depends on mipmapping parameter during the load.
Also, it seems that somehow .dds image files 'fit' and accommodate much better into memory than other file formats like .jpg, so bear this in mind too, as it could increase dramatically the number of images that can be loaded, as well as the overall stability of your running program. Eating up the memory uses to randomly exit the program with unexpected/unpredictable errors arising.
Regarding this, loading and deleting .jpg files repeatedly result in less and less images fitting into memory, it seems some sort of memory leaking or memory just not being completely released.
However performing the same operation with .dds files seems to work endlessly well.
Hope that helps.