473,471 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Ram Hungry?

Just wondering if anyone else has noticed that C# is fairly ram hungy, or
at least assigns alot of ram?

If you have has anyone developed any strategies to combat it?

- Mark Harris
Nov 16 '05 #1
10 1225
"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
If you have has anyone developed any strategies to combat it?


Only to install 4Gb DDR RAM in my development machine... :-)
Nov 16 '05 #2
On Sun, 29 Aug 2004 11:33:09 +0100, Mark Rae
<ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote:
"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
If you have has anyone developed any strategies to combat it?


Only to install 4Gb DDR RAM in my development machine... :-)


If only we could ask our clients to do that on their production machines...
Nov 16 '05 #3
"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
If only we could ask our clients to do that on their production

machines...

Oh right - you mean that compiled & distributed apps developed with C# are
memory-hungry... that's a totally different story...
Nov 16 '05 #4
On Sun, 29 Aug 2004 13:00:17 +0100, Mark Rae
<ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote:
"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
If only we could ask our clients to do that on their production

machines...

Oh right - you mean that compiled & distributed apps developed with C#
are
memory-hungry... that's a totally different story...


Any suggestions on how to save one's self from unhappy customers over ram
use?

-- Mark Harris
Nov 16 '05 #5
This topic has been pretty well beaten to death on various forums. Suggest
you hunt through some archive posts and review this topic.

The short answer is that what you are likely seeing is not nearly so bad as
it appears. First, the garbage collector frees up objects when it actually
*needs* the memory, not necessarily at the first possible moment it *could*
be freed. Secondly, Window Task Manager does not reflect the freed up
memory right away either. That is why if you minimize a .NET app the Task
Manager will suddenly show a lot more free memory. That is the point at
which (1) Windows decides it's a good time to reclaim free memory and (2)
Task Manager gets notified of that fact.

To determine how much memory is REALLY being used, look at the working set,
not the Task Manager.

--Bob

"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
Just wondering if anyone else has noticed that C# is fairly ram hungy, or
at least assigns alot of ram?

If you have has anyone developed any strategies to combat it?

- Mark Harris

Nov 16 '05 #6
Bob,

What you see as "Mem Used" in TaskMan is the Working Set.

Willy.

"Bob Grommes" <bo*@bobgrommes.com> wrote in message
news:e5****************@TK2MSFTNGP11.phx.gbl...
This topic has been pretty well beaten to death on various forums.
Suggest
you hunt through some archive posts and review this topic.

The short answer is that what you are likely seeing is not nearly so bad
as
it appears. First, the garbage collector frees up objects when it
actually
*needs* the memory, not necessarily at the first possible moment it
*could*
be freed. Secondly, Window Task Manager does not reflect the freed up
memory right away either. That is why if you minimize a .NET app the Task
Manager will suddenly show a lot more free memory. That is the point at
which (1) Windows decides it's a good time to reclaim free memory and (2)
Task Manager gets notified of that fact.

To determine how much memory is REALLY being used, look at the working
set,
not the Task Manager.

--Bob

"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
Just wondering if anyone else has noticed that C# is fairly ram hungy, or
at least assigns alot of ram?

If you have has anyone developed any strategies to combat it?

- Mark Harris


Nov 16 '05 #7
Thanks for the relies guys

You can get the current ram usage with the following code:

GC.GetTotalMemory(false);

Is there anyway to reduce the working set? its showing as 12mb in task
manager yet the actual rame usage is about 246kb...

- Mark

On Sun, 29 Aug 2004 18:13:51 +0200, Willy Denoyette [MVP]
<wi*************@pandora.be> wrote:
Bob,

What you see as "Mem Used" in TaskMan is the Working Set.

Willy.

"Bob Grommes" <bo*@bobgrommes.com> wrote in message
news:e5****************@TK2MSFTNGP11.phx.gbl...
This topic has been pretty well beaten to death on various forums.
Suggest
you hunt through some archive posts and review this topic.

The short answer is that what you are likely seeing is not nearly so bad
as
it appears. First, the garbage collector frees up objects when it
actually
*needs* the memory, not necessarily at the first possible moment it
*could*
be freed. Secondly, Window Task Manager does not reflect the freed up
memory right away either. That is why if you minimize a .NET app the
Task
Manager will suddenly show a lot more free memory. That is the point at
which (1) Windows decides it's a good time to reclaim free memory and
(2)
Task Manager gets notified of that fact.

To determine how much memory is REALLY being used, look at the working
set,
not the Task Manager.

--Bob

"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
Just wondering if anyone else has noticed that C# is fairly ram hungy,
or
at least assigns alot of ram?

If you have has anyone developed any strategies to combat it?

- Mark Harris




--
Mark Harris
Head Developer
GameHost CP
Nov 16 '05 #8

"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
Thanks for the relies guys

You can get the current ram usage with the following code:

GC.GetTotalMemory(false);

Is there anyway to reduce the working set? its showing as 12mb in task
manager yet the actual rame usage is about 246kb...

GC.GetTotalMemory(false);
doesn't return the actual ram usage, it returns the GC heap usage, which
only accounts for a (small) part of the working set. The working set is the
number of memory pages actualy mapped to your process space . You shouldn't
control/manage the WS from within your application, this is the task of the
OS memory manager.

Willy.
Nov 16 '05 #9
Hi,

I do not agree with this. The smaller app consume around 10MB of ram, this
is not that much of memory, considering than the regular machine has 256 MB

If you application cumsume lot of memory it may be cause of your
application , you may be keeping references to objects and it prevent the GC
to recover that memory.

you should better explain your escenario for further help
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mark Harris" <ma**@gamehostcp.com> wrote in message
news:op**************@mark.network.dvmesh.com...
Just wondering if anyone else has noticed that C# is fairly ram hungy, or
at least assigns alot of ram?

If you have has anyone developed any strategies to combat it?

- Mark Harris

Nov 16 '05 #10
Thanks for the reply,

I am calling 10mb alot of memory, considering the same thing in C/C++ is
much much smaller (around 400-500kb). The servers that this application
will be distributed on will all have at least 1gb of ram, 2gb standard,
but there are alot of ram intensive applications on those servers. So our
clients want to see something with absolutly minimal ram use.

- Mark

On Mon, 30 Aug 2004 09:31:56 -0400, Ignacio Machin ( .NET/ C# MVP )
<ignacio.machin AT dot.state.fl.us> wrote:
Hi,

I do not agree with this. The smaller app consume around 10MB of ram,
this
is not that much of memory, considering than the regular machine has 256
MB

If you application cumsume lot of memory it may be cause of your
application , you may be keeping references to objects and it prevent
the GC
to recover that memory.

you should better explain your escenario for further help
cheers,

Nov 16 '05 #11

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

Similar topics

46
by: Scott Chapman | last post by:
There seems to be an inconsistency here: Python 2.3.2 (#1, Oct 3 2003, 19:04:58) on linux2 >>> 1 == True True >>> 3 == True False >>> if 1: print "true" ....
1
by: Geiger Ho | last post by:
Hi, I have a program. It opens a text file about 2 MB. It reads in every line and appends them to a string. It then does a re.sub() to replace the contents of the long string and then write to a...
161
by: Dan Lenski | last post by:
Hi all, I'm a recent, belated convert from Perl. I work in a physics lab and have been using Python to automate a lot of measurement equipment lately. It works fabulously for this purpose. ...
1
by: Gismo | last post by:
Hello everyone, I'm creating a database in access but using SQL... its for my course at uni. I want to set a boolean value: Yes/No. but i don't know how to do this, table i want - CREATE TABLE...
14
by: Martin Wells | last post by:
When I want to store a number, I use "unsigned". I go with unsigned because it's the natural type for the system, and so should be the fastest. However, there are 8-Bit microcontrollers out...
0
by: pieandpeas | last post by:
Hi, i'm using a sqldatareader to display information in textboxes, now i need the best 'resource saving' method to save the information held in these textboxes back to the database.. i know there are...
4
by: pieandpeas | last post by:
Hi, i'm using a sqldatareader to display information in textboxes, now i need the best 'resource saving' method to save the information held in these textboxes back to the database.. i know there are...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.