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

Memory footprint of static methods, multiple app instances

What is the memory footprint of static methods of a windows app running on a
server when the server spins up multiple instances of the application?

In my envirionment, we have a Citrix server farm running .Net 2.0 windows
apps. Does the framework allow for instances of the same application to
access the same memory space where static methods are stored (assuming the
security context is the same for each instance)?

Jun 1 '07 #1
3 3175

"Todd" <To**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.com...
What is the memory footprint of static methods of a windows app running on
a
server when the server spins up multiple instances of the application?

In my envirionment, we have a Citrix server farm running .Net 2.0 windows
apps. Does the framework allow for instances of the same application to
access the same memory space where static methods are stored (assuming the
security context is the same for each instance)?
In this academic group, you're probably not going to get the exposure you
need for a good answer, so I'm crossposting this to a framework group.
Jun 2 '07 #2
On Fri, 01 Jun 2007 20:03:41 -0700, pvdg42 <pv****@newsgroups.nospam>
wrote:
"Todd" <To**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.com...
>What is the memory footprint of static methods of a windows app running
on a
server when the server spins up multiple instances of the application?

In my envirionment, we have a Citrix server farm running .Net 2.0
windows
apps. Does the framework allow for instances of the same application to
access the same memory space where static methods are stored (assuming
the
security context is the same for each instance)?
Though, I'm reading this from the m.p.d.framework newsgroup and I can't
say that I really understand the question. What, for example, is the
point about asking about static methods versus other methods? It's not
like when you instantiate a new instance of a class, new copies of the
code that goes with that class are created too.

If there is really some distinction between static and instance methods
here that's important to the question, perhaps the OP could be more clear
about that. On the face of it, it's not readily apparent why he's asking
only about static methods.

Anyway, I'm no expert and hopefully someone who is will correct/elaborate
as necessary. However, my recollection is that Windows doesn't even share
physical memory between native applications. What it does do (again, if I
recall correctly) is avoid copying executable read-only code to the swap
file, using the original executable file as the backing store for virtual
memory. I would guess the .NET Framework can also do this, so at least
multiple instances don't eat up your swap file. But I would be
(pleasantly :) ) surprised if multiple .NET applications could all be
resident, sharing the same physical RAM containing the executable code.

Pete
Jun 2 '07 #3
Based on your last paragraph, it appears you understood what I was asking.
And I guess my question does extend past only static methods. I'll try
posting in the dotnet.framework group. Thanks for your response.

"Peter Duniho" wrote:
On Fri, 01 Jun 2007 20:03:41 -0700, pvdg42 <pv****@newsgroups.nospam>
wrote:
"Todd" <To**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.com...
What is the memory footprint of static methods of a windows app running
on a
server when the server spins up multiple instances of the application?

In my envirionment, we have a Citrix server farm running .Net 2.0
windows
apps. Does the framework allow for instances of the same application to
access the same memory space where static methods are stored (assuming
the
security context is the same for each instance)?

Though, I'm reading this from the m.p.d.framework newsgroup and I can't
say that I really understand the question. What, for example, is the
point about asking about static methods versus other methods? It's not
like when you instantiate a new instance of a class, new copies of the
code that goes with that class are created too.

If there is really some distinction between static and instance methods
here that's important to the question, perhaps the OP could be more clear
about that. On the face of it, it's not readily apparent why he's asking
only about static methods.

Anyway, I'm no expert and hopefully someone who is will correct/elaborate
as necessary. However, my recollection is that Windows doesn't even share
physical memory between native applications. What it does do (again, if I
recall correctly) is avoid copying executable read-only code to the swap
file, using the original executable file as the backing store for virtual
memory. I would guess the .NET Framework can also do this, so at least
multiple instances don't eat up your swap file. But I would be
(pleasantly :) ) surprised if multiple .NET applications could all be
resident, sharing the same physical RAM containing the executable code.

Pete
Jun 4 '07 #4

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

Similar topics

5
by: GIMME | last post by:
One of my coworkers insists that one should never use static methods because race conditions exist. Thinking along the lines that all variable assignments are assignments to static variables. ...
6
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that,...
2
by: assi | last post by:
Hello all We are developing a large dotnet application, which includes ~ 120 assemblies. (total size of all binaries is ~ 20MB). Our application also references the following dotnet assemblies:...
1
by: Derrick | last post by:
I am reading in xml files that equate to sql tables, via XmlDataDocument, and then operating on the DataSet. With the most simple app that just loads the xml doc, I see the memory footprint of the...
3
by: Mauzi | last post by:
hi, this may sound odd and noob like, but what is the 'big' difference between static and non-static funcitons ? is there any performace differnce? what is the best way to use them ? thnx ...
0
by: CNN_news | last post by:
I would like to run multiple instances of TYPO3 (a cms written in PHP) on a single server. You can run multiple websites in two methods: multisite or multiple instances. In multiple...
4
by: Varangian | last post by:
Hello, I know that the kind of question below has been asked several times....however I need a clear answer in my specific situation. I have 2 methods. One returns an SqlDataReader and the...
2
by: bret.wortman | last post by:
I'm not sure if this is as easy a question as I'd like it to be, but here goes.... I'm working on an application that is very memory intensive, so we're trying to reduce the memory footprint of...
5
by: pgrazaitis | last post by:
I cant seem to get my head wrapped around this issue, I have myself so twisted now there maybe no issue! Ok so I designed a class X that has a few members, and for arguments sake one of the...
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: 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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.