Option Explicit
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private t As Long
Private Sub Command1_Click()
t = GetTickCount
WasteMemory
End Sub
Private Sub WasteMemory()
Dim b(1 To 100000000) As Byte
Debug.Print "Memory allocation took "; GetTickCount - t
t = GetTickCount
Open "c:\movies\Шрек.avi" For Binary Access Read As #1
Get #1, , b
Close #1
Debug.Print "Loaded 100 mln bytes in "; GetTickCount - t
Debug.Print "ok."
Debug.Print b(41435326), b(1), b(100000000)
End Sub
Сейчас этот форум просматривают: AhrefsBot, Google-бот и гости: 38