首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize =...

program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize =...

  • 资源大小:23.04 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: Process-Thread delphi

资 源 简 介

program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize = 4096 //定义页面大小 var VmAddress, CommitAddress: Pointer //存放虚拟内存基址 Text: Pchar begin //保留二页虚拟内存 VmAddress := VirtualAlloc(nil, PageSize * 2, MEM_RESERVE, PAGE_READWRITE) if not Assigned(VmAddress) then begin WriteLn( 保留虚拟内存失败! ) ExitProcess(0) end else WriteLn(Format( 保留虚拟内存成功, 基址为:[%8.8x]! , [Longint(VmAddress)])) //提交第二页虚拟内存 CommitAddress := Pointer(Longint(VmAddress) + PageSize) CommitAddress := VirtualAlloc(CommitAddress, PageSize, MEM_COMMIT, PAGE_READWRITE) if not Assigne-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

文 件 列 表

VirtualMemory
VirtualMemory.dof
VirtualMemory.cfg
VirtualMemory.dpr
VirtualMemory.exe

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.188425s