GLOBALMEM LOCK prevents the memory will paged into the pagefile.sys?
If not, how can I prevent that the memory is paged?
If not, how can I prevent that the memory is paged?
Code:
#COMPILE EXE #DIM ALL %MEMSIZE = 1024*1024*1000 ' 1GB FUNCTION PBMAIN () AS LONG LOCAL dAdr AS DWORD LOCAL hPtr AS DWORD LOCAL lRes AS LONG LOCAL i AS BYTE PTR GLOBALMEM ALLOC %MEMSIZE TO hPtr IF hPtr THEN GLOBALMEM LOCK hPtr TO dAdr FOR i = dAdr TO dAdr + %MEMSIZE @i = 65 NEXT i MSGBOX "Address: " + HEX$(dAdr,8) GLOBALMEM UNLOCK hPtr TO lRes GLOBALMEM FREE hPtr TO lRes END IF END FUNCTION
Comment