473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

RAM Memory problem VS2003 C#

I was build an application that it is using SQL server database. The clients
are conecting to the SQL server that resides on an server machine.
The application works on W2K or XP with .Net Framework 1.1. with SP1 and
have forms that have closer to 100 dataadapters on one form.
The application it is working fine on the computer with large amount of
memory i.e 512MB of RAM but on less ie 256MB sometimes the computer it is
blocked. I checked with the memory/process taskmanager and I show that
sometimes it is coming to the 120-150 MB used. When I opened a form than it
is adding more memory to be used. When I closed the form that memory it isnot
released. Even I keep only the application with the main form opened after
closing all the form the memory remain almost at the last amount used. The
only way to release the memory it is to minimize the application and to
restore. In such way the RAM memory it is freed immediatelly.
We done something wrong into the code?
It is a way to manage this?
I will very much appreciate an helping hand.
Thank you.
Nov 17 '05 #1
1 1171
Hello Marius,

There a few postings about this out and about, I found one here:

http://dotnet247.com/247reference/msgs/15/77895.aspx

The gist is this:
"When a program is getting minimized, the OS invokes SetProcessWorkingSet()
API to minimize the amount of memory used by that process.

Though .Net doesn't expose this API completely, you can still solve the
problem by either invoking the Win32 API directly through PInvoke or you can
set the ProcessWorkingSet by using System.Diagnostics.Process clsss.

This will eliminate iconising the process to free up some memory.

Improper working set may adversely affect the performace of the process as
well as the system."
You can call the SetProcessWorkingSet manually. I'm sure the experts on
this ng will point on the pro's and con's to this.....

--Brian

I was build an application that it is using SQL server database. The
clients
are conecting to the SQL server that resides on an server machine.
The application works on W2K or XP with .Net Framework 1.1. with SP1
and
have forms that have closer to 100 dataadapters on one form.
The application it is working fine on the computer with large amount
of
memory i.e 512MB of RAM but on less ie 256MB sometimes the computer it
is
blocked. I checked with the memory/process taskmanager and I show that
sometimes it is coming to the 120-150 MB used. When I opened a form
than it
is adding more memory to be used. When I closed the form that memory
it isnot
released. Even I keep only the application with the main form opened
after
closing all the form the memory remain almost at the last amount used.
The
only way to release the memory it is to minimize the application and
to
restore. In such way the RAM memory it is freed immediatelly.
We done something wrong into the code?
It is a way to manage this?
I will very much appreciate an helping hand.
Thank you.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter Strřiman | last post by:
Hi. I have a project that leaks :( I tried using the _crtDumpMemoryLeaks function, and I get the memory leaks written to the output window, but it doesn't show the correct source file. Instead...
1
by: Dave Booker | last post by:
I am using VS2003. How can I compile a (32-bit) C# project so that the program can use more than 2GB of memory space? I came across a /3G compile option searching on this subject, that is...
7
by: tonelab | last post by:
I currently have VS2003 .net 1.1 installed with a number of 1.1 projects built in it. All of these projects create the /bin dll for deployment and have been running on remote servers that have the...
3
by: Darrin | last post by:
Hello, I see that VS2005 and the new framework 2.0 is out to the public now. Wondering about some things. When you install the new framework 2.0 can a person still use visual studio 2003 or...
0
by: Maxwell | last post by:
Hello, I recently completed a MC++ (VS2003) DLL that wraps a non MFC C++ DLL and need to use it in a MC++ Console Application (no forms/guis of any kind just output to console). Trouble is...
5
by: greg.merideth | last post by:
I'm working on a service for a project that is producing some bizarre behavior. In debug mode while the service is running, the memory usage of the service (watching with process explorer) goes...
30
by: MAG1301 | last post by:
I've detected memory leaks in our huge .NET 1.1 C# application but couldn't localize them directly. So I've reduced the code to the following console application: using System; using System.IO;...
5
by: Tony | last post by:
Hi all, Here's the link to the issue we were seeing on our ASP.NET system when modifying, adding and deleting directories in framework 2.0....
5
by: Frank Rizzo | last post by:
Hello, I have a very frustrating issue I've been working on. I have a routine that does the following: 1. Load a large (declared local to the function) DataSet from the database. It contains...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.