登录
首页 » Process-Thread » program VirtualMemory {$APPTYPE CONSOLE} uses SysUtils, Windows const PageSize =...

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

于 2022-10-06 发布 文件大小:23.04 kB
0 105
下载积分: 2 下载次数: 1

代码说明:

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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • is a multithreaded example, the main demonstration supporting idle threads and t...
    是一个多线程的例子,演示主线程和空闲辅助线程的使用方法-is a multithreaded example, the main demonstration supporting idle threads and the use of threads
    2023-05-12 18:30:04下载
    积分:1
  • 多线程程序一起工作,一些线程等待另一个线程…
    多线程协同工作过程中一些线程等待另一线程提供资源所以要线程之间要同步进行-multithreaded process to work together some threads awaiting another thread there to provide resources between the threads simultaneously
    2023-07-12 18:45:03下载
    积分:1
  • 一个动态监视文件增长工具
    一个动态监视文件增长工具-a dynamic monitoring tool for document growth
    2022-02-21 16:06:04下载
    积分:1
  • 此为操作系统实验报告:处理器调度 内含:程序流程图 设计目的与思路 主要源码等. 简介:在采用多道程序设计的系统中,往往有若干个进程同时处于就绪状态。当就绪状态...
    此为操作系统实验报告:处理器调度 内含:程序流程图 设计目的与思路 主要源码等. 简介:在采用多道程序设计的系统中,往往有若干个进程同时处于就绪状态。当就绪状态进程个数大于处理器数时,就必须依照某种策略来决定哪些进程优先占用处理器。本实验模拟在单处理器情况下处理器调度,帮助学生加深了解处理器调度的工作。-experimental operating system for this report : Processor Scheduling consisting of : flowchart designed and ideas such as major source. Introduction : the introduction of multi-channel programming system, often there are a number of processes at the same time readiness. When the readiness of the process is greater than the number when the number of processors, it must, in accordance with a strategy to determine which process priority processor. Experimental simulation of the processor in a single processor scheduling circumstances, to help students better understand processor scheduling work.
    2023-03-20 12:00:03下载
    积分:1
  • 单线程的,socket
    单线程的,socket-based通信,简单sever-client通信-Single-threaded, socket-based communications, a simple sever-client communications
    2023-04-16 05:50:03下载
    积分:1
  • 进程枚举 类似于任务管理器中的任务列表 可以列举出系统运行的进程
    进程枚举 类似于任务管理器中的任务列表 可以列举出系统运行的进程-Enumeration process is similar to Task Manager task list can be listed out in the process of system operation
    2022-05-16 23:10:28下载
    积分:1
  • 1 程序开发步骤 (1) 打开vc,选择菜单项file
    1 程序开发步骤 (1) 打开vc,选择菜单项file->new,选择projects选项卡并建立一个名为"process"的win32 console applicatoin工程;创建时注意指定创建该工程的目录; (2) 在工程中创建源文件"process.cpp":选择菜单项project->add to project->files,在选择框中输入自己想要创建的文件名,这里是"process.cpp";接下来询问是否创建新文件时回答"yes";然后通过Workspace->FileView->Source Files打开该文件(同上一试验); (3) 通过调用菜单命令项build->build all进行编译连接,可以在指定的工程目录下得到debug->process.exe程序;再把给定的launchset.txt文件存入该debug目录下,就可以在控制台下进入该目录以launchset.txt为参数运行程序,命令行为:process launchset.txt;要强调的是,在launchset.txt中指定的应用程序路径要正确,否则建立新的进程时会出错,这时需要对照系统的实际情况改动所给的参数文件。 2 补充说明 这里仅仅给出了编译结果和源程序,没有所创建工程的其他文件。-a program development steps (a) to open vc, select menu item file-gt; New, tab to choose projects and the establishment of a "process" of win32 console applicatoin works; Attention to create designated to create the directory of the project; (2) establish a project document "process.cpp" : Select menu item project-gt; add to project-gt; files, the choice of their own box to create the file name,
    2022-07-19 11:28:10下载
    积分:1
  • 辞程序能进行文件的加密,运行时实现多线程。
    辞程序能进行文件的加密,运行时实现多线程。-File encryption, multi-threaded run-time.
    2022-05-05 01:40:41下载
    积分:1
  • incident kernel object, the key code of (critical) explanations, and the multi
    事件内核对象、关键代码段(临界区)的讲解,以及在多线程同步中的应用。在Windows下编写基于消息的网络应用程序,掌握阻塞与非阻塞网络程序的编写,理解在Windows平台下,采用异步选择机制可以提高网络应用程序的性能。-incident kernel object, the key code of (critical) explanations, and the multi-thread synchronization application. In the preparation of Windows-based news network applications, master obstruction and nonobstructive network program, understanding of the Windows platform, using asynchronous selection mechanism can improve network application performance.
    2022-11-24 04:00:03下载
    积分:1
  • 简单线程计数器: 一个为直接输出无间隔,一个是有时间间隔输出...
    简单线程计数器: 一个为直接输出无间隔,一个是有时间间隔输出-Counter easy thread: one for direct output without partitions, there is a time interval are output
    2022-01-26 00:47:16下载
    积分:1
  • 696518资源总数
  • 106227会员总数
  • 11今日下载