473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3199

"Todd" <To**@discussio ns.microsoft.co mwrote in message
news:45******** *************** ***********@mic rosoft.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****@newsgro ups.nospam>
wrote:
"Todd" <To**@discussio ns.microsoft.co mwrote in message
news:45******** *************** ***********@mic rosoft.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.framewor k group. Thanks for your response.

"Peter Duniho" wrote:
On Fri, 01 Jun 2007 20:03:41 -0700, pvdg42 <pv****@newsgro ups.nospam>
wrote:
"Todd" <To**@discussio ns.microsoft.co mwrote in message
news:45******** *************** ***********@mic rosoft.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
15744
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. He's wrong. Right? Two users in a web session could both access a static method at the same time and never have any trouble.
6
3271
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, no memory is lying around. GC reports only 84k of allocations. Starting 5-10 of this apps is going to start taking a considerable amount of memory. Is there a way to reduce this? Tom
2
2948
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: System,System.XML, System.Windows.Forms, System.Drawing, System.Data, System.Design. We use dotnet framework 1.1 During initialization, the application scans a directory and loads the assemblies (using Assembly.LoadFrom). It then scans all...
1
416
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 app grow to roughly 5x the size of the xml document after the xml doc is read. Can anyone comment on this? Is this expected? Below are two samples, the first hits northwind, and creates a 19meg (roughly, on my machine) xml file. The second...
3
9746
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 mauzi
0
1474
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 instance, each instance uses the same source files but has its own database and private file storage area.
4
2168
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 other returns a DataView. I was considering making them Static methods, so as to avoid creating instance of the class which takes care of these methods, kind of a helper class. Since its a web site the method may be accessed by more than one user at...
2
1361
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 classes wherever possible. I have a need for a class which is able to have a type identifier which can be examined at run-time to determine whether that class (called Domain) contains data I care about or not. I've thought of two ways to...
5
1729
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 members Y is the location of a file to be read. The original design assumes that this class will be instantiated and each instance will happily mange its own members. (ie One file location per instance...no thread-safety). Now another class A...
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7324
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
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 we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.