HighTechTalks DotNet Forums  

Memory footprint of static methods, multiple app instances

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Memory footprint of static methods, multiple app instances in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?VG9kZA==?=
 
Posts: n/a

Default Memory footprint of static methods, multiple app instances - 06-01-2007 , 02:42 PM






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)?


Reply With Quote
  #2  
Old   
pvdg42
 
Posts: n/a

Default Re: Memory footprint of static methods, multiple app instances - 06-01-2007 , 11:03 PM







"Todd" <Todd (AT) discussions (DOT) microsoft.com> wrote

Quote:
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.




Reply With Quote
  #3  
Old   
Peter Duniho
 
Posts: n/a

Default Re: Memory footprint of static methods, multiple app instances - 06-01-2007 , 11:43 PM



On Fri, 01 Jun 2007 20:03:41 -0700, pvdg42 <pvdg42 (AT) newsgroups (DOT) nospam>
wrote:

Quote:
"Todd" <Todd (AT) discussions (DOT) microsoft.com> wrote in message
news:45C7CFF6-C29B-4731-BACC-220B37F10493 (AT) microsoft (DOT) 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


Reply With Quote
  #4  
Old   
=?Utf-8?B?VG9kZA==?=
 
Posts: n/a

Default Re: Memory footprint of static methods, multiple app instances - 06-04-2007 , 09:37 AM



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:

Quote:
On Fri, 01 Jun 2007 20:03:41 -0700, pvdg42 <pvdg42 (AT) newsgroups (DOT) nospam
wrote:

"Todd" <Todd (AT) discussions (DOT) microsoft.com> wrote in message
news:45C7CFF6-C29B-4731-BACC-220B37F10493 (AT) microsoft (DOT) 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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.