Description: program VirtualMemory ($ APPTYPE CONSOLE) uses SysUtils, Windows const PageSize = 4096// definition pages size var VmAddress, CommitAddress : Pointer// virtual memory-based storage site Text : Pchar begin// reservations two virtual memory VmAddress : = VirtualAlloc (nil. PageSize* 2, MEM_RESERVE, PAGE_READWRITE) if not Assigned (VmAddress) then begin WriteLn (reservations virtual memory failure!) ExitProcess (0) end else WriteLn (Format (virtual memory retention success, sites : [% 8.8x ]! [Longint (VmAddress)]))// to the second page virtual memory CommitAddress : = Pointer (Longint (VmAddress) PageSize) CommitAddress : = VirtualAlloc (CommitAddress, PageSize, MEM_COMMIT, PAGE_READWRITE) if not Assigne
To Search:
File list (Check if you may need any files):