如何进行win10快速操作不见了的内存块操作

使用一个快速固定块的内存分配器来替换 malloc/free - 开源中国社区
使用一个快速固定块的内存分配器来替换 malloc/free
英文原文:
IntroductionCustom fixed block allocators are specialized memory managers used to solve performance problems with the global heap. In the article "", I implemented an allocator class&to improve speed and eliminate the possibility of a fragmented heap memory fault. In this latest article, the Allocator class is used as a basis for the xallocator implementation to replace malloc() and free().Unlike most fixed block allocators, the xallocator implementation is capable of running in a completely dynamic fashion without advance knowledge of block sizes or block quantity. The allocator takes care of all the fixed block management for you. It is completely portable to any PC-based or embedded system. In addition, it offers insight into your dynamic usage with memory statistics.&
自定义的固定区域(块)分配器是一个特别的内存管理策略专门用来解决全局堆栈的性能问题。 在 ""这篇文章中, 我实现了一个可以减少碎片堆栈错误可能性的快速分配器类。那篇文章中的分配器类将会作为今天的主角——X-分配器的基石,替换系统的malloc()和free()函数。
和大部分固定块分配器不同的是,X-分配器可以在预先不知道块大小和数量的前提下,以完全动态的方式运行。X-分配器也会为你提供所有的固定块管理方式。完美运行在任何PC或嵌入式设备上。此外,它还提供了内存的动态使用图可用于内存使用情况的统计。
In this article, I replace the C library malloc/free with alternative fixed memory block versions xmalloc() and xfree(). First, I'll briefly explain the underlying Allocator storage recycling method, then present how xallocator works.&Storage RecyclingThe basic philosophy of the memory management scheme is to recycle memory obtained during object allocations. Once storage for an object has been created, it's never returned to the heap. Instead, the memory is recycled, allowing another object of the same type to reuse the space. I've implemented a class called Allocator that expresses the technique. &
在这边文章中,我使用可选择的固定内存块版本的xmalloc()和xfree来代替对应的C标准库mallc和free函数。首先,我简要解释下面的Allocator存储回收方法,接着介绍xallocator是如何工作的。
基本的内存管理方案是回收在对象被分配期间获得地内存。一旦对象存储创建完成,它永远不会返回推中。相反,内存被回收,允许其他相同类型的对象重用此空间。我已经实现了一个叫做Allocator的类来解释这个技术。
When the application deletes using Allocator, the memory block for a single object is freed for use again but is not actually released back to the memory manager. Freed blocks are retained in a linked list, called the free-list, to be doled out again for another object of the same type. On every allocation request, Allocator first checks the free-list for an existing memory block. Only if none are available is a new one created. Depending on the desired behavior of Allocator, storage comes from either the global heap or a static memory pool with one of three operating modes.&Heap blocksHeap poolStatic poolHeap vs. PoolThe Allocator class is capable of creating new blocks from the heap or a memory pool whenever the free-list cannot provide an existing one. If the pool is used, you must specify the number of objects up front. Using the total objects, a pool large enough to handle the maximum number of instances is created. Obtaining block memory from the heap, on the other hand, has no such quantity limitations – construct as many new objects as storage permits.&
当应用程序使用Allocator删除块之后,此对象的内存块被释放以便重用,但并不是直接释放到内存管理器。返回的内存块被保存至一个链表,我们叫它可用链表。此表可继续提供给其他相同类型对象使用。收到分配请求时,Allocator 先检查此可用链表中是否存在可用块。只有当链表中没有可用的块才创建新的块。取决于的Allocator期望的行为,存储可来自全局堆,也可来自于具有以下三种操作模式的静态内存池。
& & & & 1.堆块
& & & & 2.堆池
&&&&& & 3.静态池堆VS 池
当可用链表不能提供相应块时,Allocator类可以从堆或者内存池创建一个新块。如果使用池,你必须预先指定创建对象的数目。 然后使用这些对象,一个足够大的可以处理最大数目实例的池即可创建。另一方面,从堆创建内存块并没有这方面的数量限制,只要存储允许,我们可创建尽可能多的对象。
The heap blocks mode allocates from the global heap a new memory block for a single object as necessary to fulfill memory requests. A deallocation puts the block into a free-list for later reuse. Creating fresh new blocks off the heap when the free-list is empty frees you from having to set an object limit. This approach offers dynamic-like operation since the number of blocks can expand at run-time. The disadvantage is a loss of deterministic execution during block creation.&The heap pool mode creates a single pool from the global heap to hold all blocks. The pool is created using operator new when the Allocator object is constructed. Allocator then provides blocks of memory from the pool during allocations.&
堆块模式尽可能的从全局堆中分配一个新内存块给对象,来实现内存分配请求。而释放的时候,内存块被放置在一个可用链表以便后续重用。如果可用链表为空,则创建从堆产生的新内存块,使你摆脱对象数的限制。这个方法提供了动态的操作方式,因为内存块数可以在运行时扩展。其缺点是在内存块创建期带来的确定性执行损失。
堆池模式从全局堆创建一个单一的池来持有所有的块。 Allocator对象被创建之后,使用操作符new来创建这个池。从此,Alloctor可以从此池中提供内存块来完成分配。
The static pool mode uses a single memory pool, typically located in static memory, to hold all blocks. The static memory pool is not created by Allocator but instead is provided by the user of the class.&The heap pool and static pool modes offers consistent allocation execution times because the memory manager is never involved with obtaining individual blocks. This makes a new operation very fast and deterministic.The Allocator constructor controls the mode of operation.&class&Allocator
&&&&Allocator(size_t&size,&UINT&objects=0,&CHAR*&memory=NULL,&const&CHAR*&name=NULL);
...Refer to ""&for more information on Allocator.
静态池模式使用单个内存池来持有所有块。这个内存池基本上在静态内存池中。这个池不是由Allocator创建的,而是由类的使用者提供的。
堆池和静态池模式都提供一致的分配执行时间,因为内存管理器从不涉及到对单个内存块的获取。这使得新的操作快速而具有确定性。
Allocator构造函数控制者操作模式。class&Allocator
&&&&Allocator(size_t&size,&UINT&objects=0,&CHAR*&memory=NULL,&const&CHAR*&name=NULL);
参考""获取更多关于Allocator信息。
xallocatorThe xallocator module has six main APIs.xmallocxfreexreallocxalloc_statsxalloc_initxalloc_destroyxmalloc() is equivalent to malloc() and used in exactly the same way. Given a number of bytes, the function returns a pointer to a block of memory the size requested.void*&memory1&=&xmalloc(100);The memory block is at least as large as the user request, but could actually be more due to the fixed block allocator implementation. The additional over allocated memory is called slack but with fine-tuning block size, the waste is minimized, as I'll explain later in the article.&
xallocator模块有6个主要的API.
xalloc_stats
xalloc_init
xalloc_destroy
xmalloc等同于malloc,使用方法也与malloc相同。给定byte数,函数返回一个指向我们所请求的内存块大小的指针。void*&memory1=xmalloc(100);
这个内存块至少和用户请求的一样大,但是因为固定内存块分配实现的原因,实际上会大一些。这个额外分配内存被称为“宽松”,此“宽松”经过了微调块大小,以便浪费最小化。稍后文中我会解释。
xfree() is the CRT equivalent of free(). Just pass xfree() a pointer to a previously allocated xmalloc() block to free the memory for reuse.&xfree(memory1);xrealloc() behaves the same as realloc() in that it expands or contracts the memory block while preserving the memory block contents.&char*&memory2&=&(char*)xmalloc(24);&&&&
strcpy(memory2,&"TEST&STRING");
memory2&=&(char*)xrealloc(memory2,&124);
xfree(memory2);xalloc_stats() outputs allocator usage statistics to the standard output stream. The output provides insight into how many Allocator&instances are being used, blocks in use, block sizes, and more.&xalloc_init() must be called one time before any worker threads start, or in the case of an embedded system, before the OS starts. On a C++ application, this function is called automatically for you. However, it is desirable to call xalloc_init() manually is some cases, typically on an embedded system to avoid the small memory overhead involved with the automatic xalloc_init()/xalloc_destroy() call mechanism.&
&xfree()等同于free()函数,只需给xfree传入之前通过xmalloc分配得到的指针来释放此内存。
xfree(memory1);
xrealloc()和realloc操作类似,用于扩展或者收缩内存块的同时保留内存块的内容。char*&memory2&=&(char*)xmalloc(24);&&&&
strcpy(memory2,&"TEST&STRING");
memory2&=&(char*)xrealloc(memory2,&124);
xfree(memory2);
xalloc_stats 把分配器使用情况统计输出到标准输出流,通过它可以窥探到内部有多少实例/块在使用,块大小,甚至更多。
在任何工作线程开始或嵌入式系统开始之前,xalloc_init必须被调用一次。在C++程序中,此函数会被自动调用。然而,某些情况下,特别是在嵌入式系统中,手动调用此函数更可取,从而避开此小内存开销涉及到自动调用xalloc_init()/xalloc_destory()机制。
xalloc_destroy() is called when the application exits to clean up any dynamically allocated resources. On a C++ application, this function is called automatically when the application terminates. You must never call xalloc_destroy() manually except in programs that use xallocator only within C files.Now, when to call&xalloc_init() and xalloc_destroy()&within a C++ application is not so easy. The problem arises with static objects. If xalloc_destroy() is called too early, xallocator may still be needed when a static object destructor get called at program exit. Take for instance this class:class&MyClassStatic
&&&&MyClassStatic()&
&&&&&&&&memory&=&xmalloc(100);&
&&&&~MyClassStatic()&
&&&&&&&&xfree(memory);&
&&&&void*&
};Now create a static instance of this class at file scope.static&MyClassStatic&myClassSSince the object is static, the MyClassStatic constructor will be called before main(), which is okay as I’ll explain in the “Porting issues” section below. However, the destructor is called after main() exits which is not okay if not handled correctly. The problem becomes how to determine when to destroy the xallocator dynamically allocated resources. If xalloc_destroy() is called before main() exits, xallocator will already be destroyed when ~MyClassStatic() tries to call xfree() causing a bug.&
当应用程序退出,任何动态分配的资源都将被通过xalloc_destroy()调用来清理。这个函数在C++程序终止时被自动调用。你千万别手动调用它,除非在C文件中使用了xallocator函数。
现在在C++程序中,几时调用xalloc_init()和xalloc_destroy()可不是见容易的事。这里引入了静态对象问题。如果xalloc_destory函数过早被调用,而当程序退出时静态对象析构函数被调用到,此时可能还需要xallocator.如下例子:class&MyClassStatic
&&&&MyClassStatic()&
&&&&&&&&memory&=&xmalloc(100);&
&&&&~MyClassStatic()&
&&&&&&&&xfree(memory);&
&&&&void*&
};文件范围内创建此类的一个静态实例。static&MyClassStatic&myClassS既然这个对象是静态的,MyClassStatic 构造函数会在main函数之前被调用。这是没有问题的,在下文的“移植问题”中将作解释。但是,析构函数在main退出之后被调用,如果处理不当,就产生问题。问题在于如何确定何时销毁xallocator动态分配的资源。如果在main函数退出之前调用xalloc_destroy ,则xallocator已经被销毁,而当&~MyClassStatic()尝试调用xfree函数时就会带来bug.
The key to the solution&comes from a guarantee in the C++ Standard:Quote:“Objects with static storage duration defined in namespace scope in the same translation unit and dynamically initialized shall be initialized in the order in which their definition appears in the translation unit.”In other words, static object constructors are called in the same order as defined within the file (translation unit). The destruction will reverse that order. Therefore, xallocator.h defines a XallocInitDestroy class and creates a static instance of it.&class&XallocInitDestroy
&&&&XallocInitDestroy();
&&&&~XallocInitDestroy();
&&&&static&INT&refC
static&XallocInitDestroy&xallocInitD
这个解决方案的关键在于C++标准的保障:
“在同一个翻译单元内,定义于命名空间范围并具有静态存储期的动态初始化对象应该按照他们在翻译单元中的定义顺序去完成初始化。””
也就是说,静态对象构造函数调用顺序和他们在文件中的定义顺序一致(翻译单元)。析构函数则以相反的顺序调用。因此,xallocator.h定义了XallocInitDestory类并创建一个静态实例。class&XallocInitDestroy
&&&&XallocInitDestroy();
&&&&~XallocInitDestroy();
&&&&static&INT&refC
static&XallocInitDestroy&xallocInitD
The constructor keeps track of the total number of static instances created and calls xalloc_init() on the first construction.&INT&XallocInitDestroy::refCount&=&0;
XallocInitDestroy::XallocInitDestroy()&
&&&&//&Track&how&many&static&instances&of&XallocInitDestroy&are&created
&&&&if&(refCount++&==&0)
&&&&&&&&xalloc_init();
}The destructor calls xalloc_destroy() automatically when the last instance is destroyed.&XallocDestroy::~XallocDestroy()
&&&&//&Last&static&instance&to&have&destructor&called?
&&&&if&(--refCount&==&0)
&&&&&&&&xalloc_destroy();
}When including xallocator.h in a translation unit, xallocInitDestroy will be declared first since the #include comes before user code. Meaning any other static user classes relying on xallocator will be declared after #include “xallocator.h”. This guarantees that ~XallocInitDestroy() is called after all user static classes destructors are executed. Using this technique, xalloc_destroy() is safely called when the program exits without danger of having xallocator destroyed prematurely.&
构造函数记录了创建的静态实例对象数,并在首次构造时调用xalloc_init。
INT&XallocInitDestroy::refCount&=&0;
XallocInitDestroy::XallocInitDestroy()&
&&&&//&Track&how&many&static&instances&of&XallocInitDestroy&are&created
&&&&if&(refCount++&==&0)
&&&&&&&&xalloc_init();
} 在销毁最后一个实例时,析构函数自动调用xalloc_destroy()。
XallocDestroy::~XallocDestroy()
&&&&//&Last&static&instance&to&have&destructor&called?
&&&&if&(--refCount&==&0)
&&&&&&&&xalloc_destroy();
当翻译单元中包含xallocator.h时,先声明xallocInitDestroy,因为#include在用户代码之前。也就意味着,任何依赖xallocator的静态用户类声明在在#include“xallocator.h”之后。这样保证了所有用户静态类析构函数执行之后才去调用XallocInitDestroy函数。运用此技术,xalloc_destroy可在程序退出时被安全调用,而不至于带来过早销毁xallocator的风险。2009年7月 总版技术专家分月排行榜第二2009年3月 总版技术专家分月排行榜第二2009年1月 总版技术专家分月排行榜第二2005年7月 总版技术专家分月排行榜第二2005年5月 总版技术专家分月排行榜第二2005年3月 总版技术专家分月排行榜第二
优秀小版主2015年8月优秀小版主2015年9月优秀小版主2015年5月优秀小版主2015年2月论坛优秀版主
2013年12月 VC/MFC大版内专家分月排行榜第二
2014年2月 VC/MFC大版内专家分月排行榜第三2013年11月 VC/MFC大版内专家分月排行榜第三
本帖子已过去太久远了,不再提供回复功能。教你如何快速开机_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
教你如何快速开机
上传于||暂无简介
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩2页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢热门搜索:
您的位置: -&
软件教程分类查找
非常抱歉!2345软件大全没能为您提供完善服务,万分感谢能得到您的指点!
您的建议:
第二章 通讯相关
第三章 下载同步
第四章 网络设置
第五章 铃声视频
第六章 个性优化
第七章 拍摄技巧
第八章 安全设置
第九章 实用技巧
第十章 相关问题
第十一章 其他设置
第二章 网络共享
第三章 同步传输
第四章 个性优化
第五章 实用技巧
第六章 相关问题
精品软件课程
人气:348825
苹果iOS是由苹果公司开发的手持设备操作系
人气:111388
Android(安卓)操作系统是一种以Linux为基
人气:37657
Windows Phone 7是微软公司发布的一款手机
人气:1459
京东(JD.com)是中国最大的自营式电商企业
小游戏推荐
怎么快速释放iPhone内存 让iPhone重新“快”起来
出处:2345软件大全
核心提示:怎么快速释放iPhone内存,让iPhone重新“快”起来?一起看看吧!
  怎么快速释放iPhone内存,让iPhone重新“快”起来?很多朋友可能还不知道,下面小编给你分享下解决办法。  要让iPhone重新流畅起来,原理大家都懂,那就是释放iPhone的RAM(运行内存)。日前Gizmodo就为大家带来了一个小技巧,让你无需重启设备,就能够让iPhone重新“快”起来。  操作非常简单,你只需长按电源键,直到“滑动来关机”的滑动条出现,这时候不需要关机,你只需将手指放在Home键上并长按大约10秒,直到界面跳转回主屏。需要指出的是,这个方法要让设备处于解锁状态(不要在锁屏界面进行上述操作,否则会唤起Siri)。  以上就是快速释放iPhone内存教程,怎么样,你学会了吗?动动手指试试看吧!
相关教程推荐
相关软件推荐
资源统计:无插件软件:96886个 无病毒软件:97192个 昨日已处理123个带插件、病毒的软件
本站总软件:97192个 软件总下载次数:22.439亿次
软件教程文章:101611篇 总浏览次数:3.261亿次rr998877 的BLOG
用户名:rr998877
文章数:104
评论数:123
访问量:291742
注册日期:
阅读量:5863
阅读量:12276
阅读量:372020
阅读量:1065974
[匿名]51cto游客:
[匿名]51cto游客:
[匿名]diverz:
[匿名]51cto游客:
51CTO推荐博文
内存、硬盘和CPU对电脑的意义,就像生活中的水、米、油和盐,是必不可少的,其中内存扮演着极其重要的角色,不仅为正在运行的程序提供了临时存储的空间,还为硬盘、CPU和主板芯片组之间的通讯构建了畅通的渠道。
随着内存的价格越来越接近“白菜价”,好多用户都已经升级至4G内存,但是问题接踵而来,4G内存在系统属性里,看到的却只有3G,如何会产生这样的问题,我的博客里已经阐述过,下面是链接,有兴趣的朋友可以看看
本人自己今天有原先的3G内存升级到5G,
一、是为了游戏
二、是为了做些实验,多开点虚拟机之类的。。。
所以虽然知道32位操作系统,以及硬件的一些原因,导致系统里只能看到3G,但是还是找到个解决方法,就是将内存的一部分变成硬盘,当然网上也参考了好多资料,下面的是一些摘抄:
一、性能的提高
打开电脑看配置,“4GB”字样着实让人兴奋不已。但新的问题来了:对于大部分用户来说,1GB内存已经完全够用,那么升级到了4GB内存后,剩下的3GB内存不是白白浪费了?确实如此!所以,下面我们要介绍的正是如何把剩下的3GB内存也物尽所用!
  用Ramdisk把内存变成超高速硬盘
  大家知道,现在的DDR2 667以上内存的存取速度平均可达4000MB/s,而一般的2.5英寸5400转笔记本硬盘读写速度仅为50MB/s左右,可见内存与硬盘之间的数据存取速度的差距。所以如果能够把内存当作硬盘来使用,那将会是多么赏心悦目的事情。
  事实上这已经不再是幻想,目前有多个软件支持把内存“变”成硬盘,如由Cenatek推出的RAMDiskVE和SuperSpeed推出的RAMDisk Plus8等都能实现。不过这些软件一般只支持几十兆或几百兆的容量转换,有一定的局限性。我们这里使用的是由网友自行改进过的Ramdisk Version 1.1,该改进版可以实现最大3GB的内存划分为虚拟硬盘,而且经测试稳定可靠。
划分1GB虚拟硬盘前/后
  使用Ramdisk生成的虚拟硬盘与内存的特性完全一样,包括超高存取速度、所存储的数据断电不保存等。从任务管理器窗口也可以看到,我们划分出1GB作为硬盘使用以后,PF内存使用率也随之由原来的207MB提升到1.2GB,也就是说在系统内存非常足够的情况下把剩余的1GB内存也充分利用了起来,而且不会影响整机性能。
  当然,如果你觉得3GB太多了,也可以只使用2GB内存,剩下的2GB都划分为虚拟硬盘使用,这样就有了更多的发挥空间了。事实上对于大部分用户来说,1GB的内存已经完全满足需求了,所以,划分3GB内存出来作为虚拟硬盘当然也是完全可以的!
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/130718.jpg" border="0" />Ramdisk Version 1.1,最大支持3GB内存划分
  由于该Ramdisk Version 1.1软件为绿色版本,因此使用起来非常简单,打开后直接选择需要创建的“磁盘大小”和“磁盘符”,再选择“固定磁盘”,按“应用”或“好滴”就OK。右下角有个加载映象和保存映象的按钮,估计是COPY备份所创建磁盘里的数据用的,大家不妨自己试着研究一下,这里就不再多说。
  由于几大硬盘测试软件均未能认出由内存划分出来的虚拟硬盘,所以未能对这个“硬盘”进行存取性能测试,因此我们决定用最传统的实际应用办法进行。
  Ramdisk虚拟硬盘实战――Photoshop处理
  我们知道在Photoshop运行过程中,程序需要占用和消耗非常大的缓存空间,利用这一点,我们把Photoshop的缓存地址设置在R盘,即所设虚拟硬盘。然后进行Photoshop相关测试。缓存设置方法:编辑--&预置--&增效工具与暂存盘。
Photoshop缓存设置
   Test1:在Photoshop制定一个批处理动作test,由于此动作涉及镜头光晕、染色玻璃、径向模糊、壁画等高级特效,因此需要消耗更大缓存。设置前后分别测试Photoshop批处理3张图片所花费的时间,看缓存空间设置在本地硬盘上和设置在“虚拟硬盘”上的速度有没有明显差别。
  Test2:制作一个大容量分别达100MB和700MB的PSD文件,前后分别测试Photoshop打开该PSD文件所花费的时间。
  注:需连续处理或打开两次相关文件,记录第二次成绩为准。
Photoshop批处理测试
系统默认状态
1GB Ramdisk
2GB Ramdisk
批处理3张图片
打开100MB PSD文件
打开700MB PSD文件
  从测试结果来看,划分并使用1GB虚拟硬盘作为缓存区时,批处理3张图片的速度为默认状态的2.54倍,划分2GB时由于内存和缓存均充足因此速度不再有什么变化。
  另据我们观察,未设置虚拟硬盘为缓存之前,在Photoshop批处理工作过程中会出现页面假死和图片显示不完全现象,同时打开其它软件显得比较费劲;而在设置后就显得十分顺畅,同时还可以进行其它操作,这也一定程度上说明了使用内存作为缓存的优势。
  打开PSD文件测试中,2GB Ramdisk下用时7秒,超出默认状态下的3倍。其它未能测出成绩的原因是缓存空间不足,因为Photoshop运行过程中缓存空间需求非常大,特别是大文件处理的时候,我们所划分的1GB和2GB空间就不够用了。
  Ramdisk虚拟硬盘实战――PCmark2005测试
  接下来,我们同样分配了2GB内存作为虚拟硬盘,并把PCmark2005程序安装在此虚拟硬盘上,点击运行。测试结果让人大惊失色,硬盘HDD项目得分竟然高达19万,比传统测试高出接近50倍,同时也令总得分超过2倍。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/242609.jpg" border="0" />前面是常规测试,后面是Ramdisk测试
前面是常规测试,后面是Ramdisk测试
PCmark2005测试
2GB Ramdisk
HDD-XP Startup
6.627 MB/s
548.936 MB/s
HDD-Application Loading
5.157 MB/s
506.757 MB/s
HDD-General Usage
4.390 MB/s
424.682 MB/s
HDD-Virus Scan
74.772 MB/s
HDD-File Write
37.909 MB/s
855.768 MB/s
  再看HDD子项目中,最高的HDD-Application Loading缓冲测试更是高达98倍,让人目瞪口呆。
  我们分析了个中原因,其实很简单,由于内存的存储速度比硬盘要高出许多,因此就是在硬盘测试项目中,数据的存取传输相当于在“硬盘与内存(虚拟硬盘)”之间进行,因此理所当然的就会比常规的在“硬盘与硬盘”之间高出许多。
  由此我们想到,是否所有的软件安装在Ramdisk里运行,速度都会高出许多呢?笔者试了多个软件,发现并未能如想象中快多少,因为许多软件都主要是通过系统的缓存来运行,与软件的安装位置无关的。只有自身带有缓存设置的软件如Photoshop和Office等,把软件的缓存设置在Ramdisk里效果才是最明显的。
二、用尽4GB内存的其它方法
  把内存变成虚拟硬盘以后,我们还可以尝试更多的方法把用不到的1-3GB内存用掉。如刚刚提到过,我们可以把系统的缓存设置在Ramdisk虚拟硬盘上,从而有利于提高软件和整机的运行及反应速度。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/365078.jpg" border="0" />把系统的缓存设置在虚拟硬盘上
  或者,也可以把IE的Temporary File文件夹设置在Ramdisk上,因为使用浏览器的时候需要经常反复读写Temporary File文件夹的内容,这时候Ramdisk硬盘的高速将可以很好的加速网页的打开速度,有条件的朋友不妨亲自体验一下。
  把IE的Temporary File文件夹设置在Ramdisk上的方法很简单,步骤如下:开始―&控制面板―&Internet选项―&常规―&设定浏览历史记录―&点击“移动文件夹”选择Ramdisk即可。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/388765.jpg" border="0" />设置IE的Temporary File
  当然还有更多用尽4GB内存的方法,这里就不再一一介绍了,感兴趣的用户不妨自己多挖掘一下,并与大家共同分享。
  总结:我们已经深深感受到,自从Vista操作系统上市以来,人们对笔记本硬件尤其是显卡和内存要求的提高越来越明显和苛刻,4GB也将很快成为顶级笔记本电脑的标准内存配置。Apacer DDR2 800MHz单条2GB笔记本内存的出现可谓及时,可以说完全满足了苛刻的Vista以及在Santa Rosa或者未来的Montevina新平台下进行商务活动、游戏娱乐、专业绘图等多元化、多领域的专业应用软件的运行需求。
  另外,相信不久以后会有越来越多人都将用上4GB内存,如何把这4GB真正用上、用好、用到刀刃上,又成为了人们进一步关心的问题,所以希望这篇评测指导文章能够给网友提供帮助。
帽子戏法,Ramdisk让内存变临时硬盘   Ramdisk是微软开发的一个命令行界面的虚拟内存小工具,国内有网友为它编写了一个界面,使用起来更方便。它可以把一部分内存空间虚拟成RAM驱动器、固定磁盘或者可移动磁盘三者中的一种,由于使用的是内存空间,运行速度比硬盘要快很多,而且这一部分空间在内存掉电后会自动删除,假如把它指定为系统的临时文件存储和IE临时文件夹,将可以大大减少磁盘的碎片。当然,这一特性也会对我们造成一定的麻烦,使用时千万不要把重要文件放置在虚拟的空间中,否则也会在掉电后消失。   1、Ramdisk的安装   第一次使用Ramdisk,需要先安装,直接点击界面上的“安装Ramdisk”,安装时,Windows可能会警告驱动程序没有数字签名,不去理睬它,直接按Yes就可以了。在安装以后,假如不想再使用Ramdisk,可以点击“删除Ramdisk”把虚拟空间删掉。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/421140.jpg" border="0" />
  2、Ramdisk的设置   安装Ramdisk后,界面左边的选项就变为可选了,笔者建议大家根据实际情况设置虚拟磁盘的大小,比如笔者平时实际内存使用量在1GB以内,那么2GB内存就可以设置虚拟磁盘256-768MB,笔者设置的是512MB,盘符选择一个没有被占用的就可以了,建议使用默认的R盘。磁盘类型一般选择“固定硬盘”,最后点击一下“好滴”,虚拟空间就出来了。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/440500.jpg" border="0" />
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/466437.jpg" border="0" />
  3、虚拟空间的运用   虚拟空间设置好以后,我们就可以把一些临时的东西移到这个空间中。下面以更改Windows的临时文件夹位置为例,看看怎么设置,IE临时文件夹的更改可以借助于“超级兔子”这一软件。   依次打开“控制面板”→“性能和维护”→“系统”,在“高级”页面中点击“环境变量”按钮,依次更改上面的“用户变量”,把“TEMP”和“TMP”两个目录更改到“R:\TEMP”;同样的,下面的“系统变量”中的“TEMP”和“TMP”也需要作相应的更改。
650) this.width=650;" onclick='window.open("/viewpic.php?refimg=" + this.src)' alt="" src="/attachment/498187.jpg" border="0" />
了这篇文章
类别:┆阅读(0)┆评论(0)

我要回帖

更多关于 win10快速操作不见了 的文章

 

随机推荐