473,777 Members | 1,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System GC interface or events?

Bob
Is there an interface or events in the system that occurs pre and post
garbage collection that one of my objects can attach to? I need to know in
my application when garbage collection is about to take place and when it
has completed. This is to make sure a system critical event does not happen
while the application is frozen, if it freezes for longer than 2 seconds.
Thanks!
Jul 21 '05 #1
3 1886
Hi Bob

No, there are no GC events you can monitor to find out when a GC will occur or has occurred.

What kind of critical event are you concerned out?
Thanks
-Chris

--------------------
From: "Bob" <rv@b.com>
Subject: System GC interface or events?
Date: Mon, 19 Jan 2004 08:40:18 -0800
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O$************ **@tk2msftngp13 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: blv-gate-01.boeing.com 130.76.32.64
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!TK2 MSFTNGP08.phx.g bl!tk2msftngp13 .phx.gbl
Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:121819
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Is there an interface or events in the system that occurs pre and post
garbage collection that one of my objects can attach to? I need to know in
my application when garbage collection is about to take place and when it
has completed. This is to make sure a system critical event does not happen
while the application is frozen, if it freezes for longer than 2 seconds.
Thanks!

--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Jul 21 '05 #2
Bob
There are some in our group that are afraid that .NET will freeze the
application for up to 15 seconds doing garbage collection when the system
must respond within 1 second of a button press. From the analysis I have
done to date, I don't see that happening. I'm just trying to come up with
anything that would appease their concerns.

Thanks!

""Chris Lyon [MSFT]"" <cl***@online.m icrosoft.com> wrote in message
news:gY******** ******@cpmsftng xa07.phx.gbl...
Hi Bob

No, there are no GC events you can monitor to find out when a GC will occur or has occurred.
What kind of critical event are you concerned out?
Thanks
-Chris

--------------------
From: "Bob" <rv@b.com>
Subject: System GC interface or events?
Date: Mon, 19 Jan 2004 08:40:18 -0800
Lines: 8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <O$************ **@tk2msftngp13 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: blv-gate-01.boeing.com 130.76.32.64
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!TK2 MSFTNGP08.phx.g bl!tk2msftngp13 .
phx.gblXref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:121819
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

Is there an interface or events in the system that occurs pre and post
garbage collection that one of my objects can attach to? I need to know inmy application when garbage collection is about to take place and when it
has completed. This is to make sure a system critical event does not happenwhile the application is frozen, if it freezes for longer than 2 seconds.
Thanks!


--

This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they
originated.

Jul 21 '05 #3
Hi Bob

There is no reason to expect a delay like that. There are ways to minimize collection delay times when designing an interactive managed application. For example:

-avoid using finalizers. Objects in the finalization queue tend to hang around longer and require more overhead when collecting
-avoid forcing generation 2 collections by calling GC.Collect(). Gen2 collections are expensive performance-wise.
-if possible, use concurrent GC (on multi-proc machines). This setting allows generation 2 collections to occur while the program is running

See these articles for more information:
http://msdn.microsoft.com/library/de...anagedcode.asp
http://msdn.microsoft.com/library/de...etgcbasics.asp
http://weblogs.asp.net/ricom/archive.../02/40782.aspx (or any other posts by Rico).

You might also want to monitor the microsoft.publi c.dotnet.framew ork.performance newsgroup.

If you have any other questions, let me know

Thanks
-Chris

--------------------
From: "Bob" <rv@b.com>
References: <O$************ **@tk2msftngp13 .phx.gbl> <gY************ **@cpmsftngxa07 .phx.gbl>
Subject: Re: System GC interface or events?
Date: Mon, 19 Jan 2004 17:34:28 -0800
Lines: 64
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <ef************ **@TK2MSFTNGP11 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.genera l
NNTP-Posting-Host: blv-gate-01.boeing.com 130.76.32.64
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!cpm sftngxa09.phx.g bl!TK2MSFTNGP08 .phx.gbl!TK2MSF TNGP11.phx.gbl
Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:121873
X-Tomcat-NG: microsoft.publi c.dotnet.genera l

There are some in our group that are afraid that .NET will freeze the
application for up to 15 seconds doing garbage collection when the system
must respond within 1 second of a button press. From the analysis I have
done to date, I don't see that happening. I'm just trying to come up with
anything that would appease their concerns.

Thanks!

""Chris Lyon [MSFT]"" <cl***@online.m icrosoft.com> wrote in message
news:gY******* *******@cpmsftn gxa07.phx.gbl.. .
Hi Bob

No, there are no GC events you can monitor to find out when a GC will

occur or has occurred.

What kind of critical event are you concerned out?
Thanks
-Chris

--------------------
>From: "Bob" <rv@b.com>
>Subject: System GC interface or events?
>Date: Mon, 19 Jan 2004 08:40:18 -0800
>Lines: 8
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <O$************ **@tk2msftngp13 .phx.gbl>
>Newsgroups: microsoft.publi c.dotnet.genera l
>NNTP-Posting-Host: blv-gate-01.boeing.com 130.76.32.64
>Path:cpmsftngxa07.p hx.gbl!cpmsftng xa06.phx.gbl!TK 2MSFTNGP08.phx. gbl!tk2msftngp1 3.
phx.gbl >Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.genera l:121819
>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
>
>Is there an interface or events in the system that occurs pre and post
>garbage collection that one of my objects can attach to? I need to knowin >my application when garbage collection is about to take place and when it
>has completed. This is to make sure a system critical event does nothappen >while the application is frozen, if it freezes for longer than 2 seconds.
>Thanks!
>
>
>

--

This posting is provided "AS IS" with no warranties, and confers no

rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this

message are best directed to the newsgroup/thread from which they
originated.


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

Jul 21 '05 #4

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

Similar topics

8
3772
by: Ash | last post by:
Hello all, I am hoping this is the appropriate newsgroup for a C++ interface design question. I am trying to design an interface for a subscriber to register/deregister handlers for various events. The callbacks specified by the subscriber will be called when the events get trigerred in a different thread. Each event has different kinds of data associated with it. To achieve this I have the following: // The following describes the...
2
22312
by: Derrick | last post by:
How does one declare an event within an interface, so that every class which implements that interface must implement that event? I think I just need to specifiy the actual event as I would a function, but what about the delegate? Up to now, all my interfaces have only dealt with properties and functions. Here's basically what I want to do (for example): public interface IFoo
0
1352
by: Dave McIver | last post by:
Hello all, Any help on this issue appreciated because I am getting a bit stuck! I am using VS.NET 2003. I have wrapped a multithreaded win32 dll using managed C++ and added a C# interface, but am having trouble directing the events generated by the win32 dll to events declared in the managed C++ layer, which are in turn directed to the GUI.
2
2514
by: COLIN JACK | last post by:
Hi All, I've got a situation where I'm implementing an interface (BaseInterface in example below) and I want to use explicity interface implementation of an event so that I can add type safety. To see what I mean look at the example below where the class implementing the interface actually wants the event to be for a more specific delegate. Now this seems to work but the code, to me is unnecessarily ugly. This leaves me wondering if...
0
1218
by: Gene | last post by:
I have a Windows Form control that I have embedded in an ASP.NET page. I now have the need to catch an event from the control on the webpage. After researching the situation I found that this is the way to expose events. I added the following code to my class. Imports System.IO Imports Assetta.ColumnStyles Imports ICSharpCode.SharpZipLib.Zip.Compression Imports ICSharpCode.SharpZipLib.Zip.Compression.Streams
0
273
by: solex | last post by:
Hello All, I have posted previously regarding the above assembly. I have created a 2 classes and an interface to mask the complexities of using the above assembly. The purpose of the interface is to allow one to create any UI that they wish to search for files using the program find.exe. All the user has to do is implement the interface and instantiate the FileFinderControl. Class: ProcessController (has two threads that montor...
6
1945
by: Ricky W. Hunt | last post by:
It's dawning on my a lot of my problems with VB.NET is I'm still approaching it in the same way I've programmed since the late 70's. I've always been very structured, flow-charted everything, used subroutines, etc. Now I'm trying to study this new way and I'm getting some terms confused and can find no clear definition (some even overlap or use two different words for the same thing, even when they are actually different). I'm reading a...
3
246
by: Bob | last post by:
Is there an interface or events in the system that occurs pre and post garbage collection that one of my objects can attach to? I need to know in my application when garbage collection is about to take place and when it has completed. This is to make sure a system critical event does not happen while the application is frozen, if it freezes for longer than 2 seconds. Thanks!
2
1408
by: puzzlecracker | last post by:
I want interface, that in addition to providing methods declarion, also contain events: interface Connection{ public event MyDelegateHandler handler; public event MyDelegateHandler2 handler2; public void Method1();
0
9628
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
10122
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
10061
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
9923
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
8954
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
6722
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();...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.