By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,372 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Memory footprint of static methods, multiple app instances

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a

"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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.