473,324 Members | 2,124 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,324 software developers and data experts.

Memory Issues?



I seem to be having some problems with .NET running a garbage collection.

I have setup an application that reads in records from a database into a
dataset. The user needs to modify a group of rows in this dataset, a save
routine is run when they are done with all of their modifications, and the
dataset is passed back to the SQL server.

We aren't talking about lots of rows here. The max selection will be 50K
(which is a lot but nothing obscene)

When I run the app I watch the memory for the application jump from 20MB to
60MB. When I close the child form I get no memory back even though I
specificly call GC.Collect (for testing purposes only) Even after extended
periods the memory is not recycled.

Also when I am closing the forms I am expcitly calling the Dataset.Dispose()
methods as well as any other dispose object that may be unmanaged.

An even bigger memory gain is seen if I run a Crystal Report on an ADO.NET
dataset. up to 120MB, again never to be returned to the OS until the
application is completly shut down.

The problem is that this application will be run on a Windows Terminal
server and if I keep grabbing memory like this and not returning it over
30,40 users I am going to have a big memory problem.

Anyone have any thoughts?

Thanks,

Justin
Jul 25 '05 #1
3 1513
Justin,

All what you tell does not free any memory.

An object is released if it has not any reference anymore to something or
that there is nothing referencing it anymore.

That is what the GC checks to release it. Calling the GC thousand times does
nothing more than eating processing time, if that condition is not
fullfilled.

(Although you should not rely on the taskmanager the information given in
that says nothing, see some of the messages from Willy in this newsgroup)

http://groups-beta.google.com/group/...rch+this+group

I hope this helps,

Cor
Jul 25 '05 #2
Cor,

Thanks for the info. After reading a bunch of posts in this and the
performance new group I realized I am not the only one to look at this
improperly.

I understand that the GC will collect when it comes down to a memory crunch,
but my specific concern is that this is running on the terminal server. If
each session allocates this memory to itself and does not share it across
the sessions, then 30 users running a 125 in their heap will tie up 3.7Gig I
have 4GB in these terminal servers but that doesn't leave a lot of room.

Anyone have experience with this specific situation?

Also I am calling the dispose and close methods of everything that I can on
the MDIChild close, there are no references to anything in the MDIChild on
the parent.

One other thing that I noticed when I run the Allocation Profiler, is that
there are a lot of assemblies called in the MDI child that are still open
when I close that child.

Is there any way to force these assemblies to unload or does .Net hold them
open for better performance on the next run?

I appreciate the input.

Thanks,
Justin
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Justin,

All what you tell does not free any memory.

An object is released if it has not any reference anymore to something or
that there is nothing referencing it anymore.

That is what the GC checks to release it. Calling the GC thousand times
does nothing more than eating processing time, if that condition is not
fullfilled.

(Although you should not rely on the taskmanager the information given in
that says nothing, see some of the messages from Willy in this newsgroup)

http://groups-beta.google.com/group/...rch+this+group

I hope this helps,

Cor

Jul 26 '05 #3
Justin,

In your case would I make a new question crossposted to this newsgroup, the
newsgroup of your programming language and a kind of terminal server
language.

I would make the subject
"Memory problems with Terminal Server"

Why crossposting to this newsgroup. At least because I am as well interested
in the answers and I am not active in C#.

:-)

Cor
Jul 26 '05 #4

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

Similar topics

18
by: Tron Thomas | last post by:
Given the following information about memory management in C++: ----- The c-runtime dynamic memory manager (and most other commercial memory managers) has issues with fragmentation similar to a...
29
by: keredil | last post by:
Hi, Will the memory allocated by malloc get released when program exits? I guess it will since when the program exits, the OS will free all the memory (global, stack, heap) used by this...
25
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My...
4
by: Simon Johnson | last post by:
Dear All, I have decided to take the big plunge and drop the Microsoft platform and use Mod_Python and Apache in it's place. I've never used Linux before this project so it's a really big...
14
by: Joe | last post by:
I'm trying to track down where objects are referenced because I want to clean up the memory when I'm done with them. I thought I found all references but it doesn't seem that way because calling...
2
by: ruca | last post by:
Hi gurus, Can anyone tell me please when I really must setup the value of memory that aspnet_wp or w3wp must use in IIS server machine? What I mean is that we have clients that have diferent...
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...
3
by: Sam Samson | last post by:
Can any-one recommend some good sites detailing how to code a simple memory profiler? How do they "look under the hood"? I built an uber simple service that tracks the process' memory but I need...
5
by: Max2006 | last post by:
Hi, What is the limit for memory that a .NET process or AppDomain can use? Thank you, Max
22
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.