1-64 C ++ memory management system to run 32-bit software will take up more memory?

 

  With the large-capacity memory become routine computer platform configuration, assembly machine when configuring many users will choose the 8GB or even 16GB of memory capacity specifications for use on their own machines, if you want this 8GB or even 16GB of content in the system can take full advantage of them, you must use the 64-bit platform operating system when used as a support.

  But it is worth noting that although the 64-bit system has become the mainstream in recent years, but a lot of software or software many users run when the computer is still using the 32-bit version, which raises an interesting question. You need more or less memory to allow 32-bit applications run 64-bit version of Windows? And there is a rumor saying "on 64-bit systems running 32-bit applications consuming memory compared to systems running 32-bit 32-bit applications to be 1.5 times higher than the demand. "

  Recent foreign media response to this situation by testing to verify that the system is running in 64-bit 32-bit applications consuming memory compared to 32-bit systems running 32-bit applications to be higher if the topic is really established.

  First we have to look at 32-bit programs on 64-bit system, which is how to implement it? In a 64-bit system inside when not using any compatible support assistance can not let 32-bit programs to achieve run, after all, 32 programs compare 64-bit program system pointer , data type and the system call instruction are different.

  Therefore, we must first know what the 32-bit programs play a role in the process on 64-bit systems.

  

 

   NOTE : On the 64-bit operating systems, Windows uses WoW64 subsystem , it effectively implement a 32-bit Windows and the x64-based system simulator Itanium (IA64) system simulator .

  IA64 instruction by a processor system and a different memory page size (x86 and x64 is 4K, IA64 of 8K ) composition, since the x64 processor has all the instructions and x86 processors use the same memory page size. In both cases, a WoW64 64 of the Windows kernel and a communication interface between the 32-bit version of ntdll.dll , so that they can be provided by a native 64-bit Windows kernel function processing.

  ( Ntdll operating system is WindowNT prototype library ) (i.e., by WoW64 subsystem 64 may be provided corresponding engineering system for the processing program 32 )

  X64 and IA64 system for implementation requirements three DLL files, respectively wow64cpu.dll, wow64win.dll, and wow64.dl L . Their function is to provide in Win32k.sys in the Windows section contains functions and the implementation of the kernel, memory management, process scheduler and other core elements of the operating system .

  A thunk is a subprogram, a program that allows execution of a subroutine or function in a common system. In this case, it extracts the parameters from the stack 32 calls the program, converts them to their counterparts 64 and 64 so that the system call . In return from the call, the 64-bit result is returned to the converter 32 and pushed onto the call stack using the caller program .

  

 Moreover, we should note a few other important differences .

  IA64 system uses two additional files: IA32exec.bin is x86 software simulator and Wowia32x.dll provides the interface between the WoW64 and software simulator .

  Process a 32-bit program will load the files, and the 64-bit version of ntdll.dll in both can be loaded into another DLL, apisetschema.dll, and in later versions of Windows 7 and 32-bit process, which It will be loaded into all processes in a unique 64-bit binaries.

  When a 32-bit program starts, it will load wow64.dll order to load ntdll.dll 32-bit versions and% SystemRoot% \ Syswow64 any necessary 32-bit DLL. Most of these files are the same binary files in 32-bit system, but some has been rewritten modified WOW64 .

  Test run by the virtual machine two Windows 7 Ultimate version, respectively, 64-bit and 32-bit system using the same and each a fully installed and patching systems, each system memory allocated 2GB . Disable both the swap file to get a better picture memory ensure that the memory can not be paged out to disk usage.

  Come by Sysinternals Process Explore the collection of collection system is in operation and usage WindowSystem of these working Group figures reflect the amount of memory used by the program . It is even more complex they have been loaded by another process also reflects the amount of memory that the shared library used. LibreOffice monitoring program to test soffice.exe, soffice.bin need to find all the programs effective memory usage of all three processes at run time. The test mode is turned on when the calculator, open the .xls file 3,7MB and .PPTX file 3.9MB of memory occupied by usage .

 

 

   After a series of comparison is a comparison of 32-bit and 64-bit system is not more than 9.9% difference in terms of RAM , the same type and in some tests also obtained similar results, even a final ratio of 32 64-bit system using less memory-bit systems . Therefore, it requires a 64-bit version of Windows when more RAM to run 32-bit applications running than their 32-bit? In general, yes. However, you need to upgrade your memory? Probably not, but demand has not run 1.5-fold difference in use.

 

 

endl;

Guess you like

Origin www.cnblogs.com/icmzn/p/11816243.html