Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Time Memory Size

Status
Not open for further replies.

li

Programmer
Feb 28, 2001
2
US
I am porting a UNIX C mathematical system to Visual C++ for a research at school. Sometimes the system needs to locate large memory space by "malloc()" functions. My machine has 128M memory. For some reason, the memory (fault) swap is kicked in after 25M of the memory is allocated by the system. I add another 128M RAM to the machine, and then it pushes the limit to 50M. But my project eventually will require 200M space (even more).

Microsoft people told me to use function "setprocessworkingsetsize" to set the physical memory size. But I got error message code 120, which says that function is not supported in the system! I have installed the complete version of Visual C++ 6.0 professional edition on Window 98. They didn't answer why the function is not supported.

They refer me to Bugslayer Column on October 2000 MSDN Magazine about WST. Then I know the general purpose of WST. Be honest with you I have no idea about the content of the column, since I am new to Visual C++. I download and run the "smooth" program. And I get a link error of cannot open file "DBGHELP.lib". I guess I need to copy that from Window 2000 as mentioned on web. But I have a feeling that this is not a right prescription for my case.

I have more than enough main memory space. And what I really need is to set the physical memory size (or working set ?). Because it is really the data area triggers the memory swap. If I don't have a large working set, no matter how the functions are arranged in memory, the problem remains. Does my theory sound correct?

What should I do?
 
Li,

> What should I do?

You should not be developing an application that needs to control memory to the degree that you describe on Windows 98!

> But my project eventually will require 200M space (even more).

That must be a server application yes? Develop it on a server OS.

"But, that's just my opinion... I could be wrong".
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top