12-10-2005, 10:11 PM
I have a problem. I need to be able to copy a huge amount of memory over and over again and I need to figure out the fastest way to do it. I am pretty sure that it it using memcpy, but it crashes, what am I doing wrong here?
Code:
#include "crt.bi"
screenres 320, 200, 32,
dim hugeblock2 as integer ptr
dim hugeblock as integer ptr
hugeblock2 = imagecreate(1024, 2048)
hugeblock = imagecreate(1024, 2048)
dim t as double
dim i as integer
t = timer
FOR i = 0 to 50
memcpy(hugeblock, hugeblock2, 8400900)
NEXT
print timer - t
t = timer
FOR i = 0 to 50
PUT hugeblock, (0,0), hugeblock2, pset
NEXT
print timer - t
sleep
imagedestroy hugeblock2
imagedestroy hugeblock
f you play a Microsoft CD backwards you can hear demonic voices. The scary part is that if you play it forwards it installs Windows.