Memory Usage
-
If I run the same executable in two different ways: 1) Run the exe twice from the same directory 2) Copy the exe to two different directories and run it from each directory Question 1: Will method (1) uses less physical memory than method (2)? Question 2: Is the answer to question 1 the same for both Windows and Unix?
-
If I run the same executable in two different ways: 1) Run the exe twice from the same directory 2) Copy the exe to two different directories and run it from each directory Question 1: Will method (1) uses less physical memory than method (2)? Question 2: Is the answer to question 1 the same for both Windows and Unix?
Question 1: Will method (1) uses less physical memory than method (2)? both methods will use the same amount of memory Question 2: Is the answer to question 1 the same for both Windows and Unix? yes. on both windows and unix but the second time, it will be faster cause of paging.
-
Question 1: Will method (1) uses less physical memory than method (2)? both methods will use the same amount of memory Question 2: Is the answer to question 1 the same for both Windows and Unix? yes. on both windows and unix but the second time, it will be faster cause of paging.
>Question 1: Will method (1) uses less physical memory than method (2)? >both methods will use the same amount of memory I´m not so sure. This is what I learned about Win2000 (you might be right for Win9x, Nish, I only know about NT): When calling CreateProcess the system locates the .exe, creates a new process kernel object, and reserves a region of adressspace to contain the file. It then notes that the physical storage backing the region is contained on disk, instead of paging file. When the execution starts paging, buffering and caching is performed by the system. This means that both codepages and datapages are shared by all instances of a running application. When an app is changing its data (writing to the memory-mapped file), the system catches the attempt, allocates a new memoryblock, copies the data, and make changes for this process-unique page. Process 1 Code1 Code2 Data1 Process 2 Code1 Code2 Data1 Memory Code1 Code2 Data1 Data1.1 (Changed by process 1) Conclusion: More memory is used if running two (identical) .exes from different locations on disk, as the system must reserve memory for each file. Hope this will help.
-
>Question 1: Will method (1) uses less physical memory than method (2)? >both methods will use the same amount of memory I´m not so sure. This is what I learned about Win2000 (you might be right for Win9x, Nish, I only know about NT): When calling CreateProcess the system locates the .exe, creates a new process kernel object, and reserves a region of adressspace to contain the file. It then notes that the physical storage backing the region is contained on disk, instead of paging file. When the execution starts paging, buffering and caching is performed by the system. This means that both codepages and datapages are shared by all instances of a running application. When an app is changing its data (writing to the memory-mapped file), the system catches the attempt, allocates a new memoryblock, copies the data, and make changes for this process-unique page. Process 1 Code1 Code2 Data1 Process 2 Code1 Code2 Data1 Memory Code1 Code2 Data1 Data1.1 (Changed by process 1) Conclusion: More memory is used if running two (identical) .exes from different locations on disk, as the system must reserve memory for each file. Hope this will help.
Thanks for the info. :-) Nish Sonork ID 100.9786 voidmain
-
Thanks for the info. :-) Nish Sonork ID 100.9786 voidmain
-
Thanks Moliate :-) Yup, I got it back :-D :-D :-D :-D :-D Sonork ID 100.9786 voidmain