在Dot Net的征途中奋进

Work hard, Study hard!

  博客园 :: 首页 :: 联系 :: 订阅 订阅 :: 管理
  19 Posts :: 0 Stories :: 32 Comments :: 0 Trackbacks

公告

昵称:TerryGao
园龄:5年
粉丝:0
关注:0

搜索

 
 

常用链接

我的标签

最新评论

阅读排行榜

评论排行榜

推荐排行榜

2011年12月26日 #

内存泄露的类型http://www.red-gate.com/supportcenter/Content/ANTS_Memory_Profiler/help/7.2/amp_memory_leaks

大多数内存问题都会归结为以下类型之一。确定问题的类型将有助于你定位和解决问题。 

托管内存泄露

The typical symptom of a memory leak is that the performance degrades while the program runs; performance recovers on restart and then degrades again. The amount of bytes in the .NET heap increases.

非托管内存泄露

The performance degrades while the program runs; this recovers on restart and then degrades again. The number of private bytes (the amount of real and paged memory requested by the program) in use often increases at a greater rate than the number of bytes in the .NET heap.

大对象堆的碎片

The main symptom of fragmentation is that OutOfMemory exceptions are thrown even though there is sufficient space on the .NET heap.

大容量的RAM占用

Some programs need to use a lot of memory. There is little specific advice that can be given about this, since the best approach to reducing the amount of memory used will depend on your program's requirements. Using a profiler may give you suggestions for where to optimize code by showing which parts of your program are using the most memory.

 

内存计数器的含义:

By default, ANTS Memory Profiler uses the Private bytes counter, because this measure is considered the most useful for most kinds of memory problem. 

Windows Task Manager shows the Private working set counter by default. The Private working set is unavailable in ANTS Memory Profiler because it is only accurate immediately after a garbage collection.

The following table summarizes some of the main different ways of measuring memory:

Counter

Description

Including shared processes?
(DLLs in memory, .NET runtime)

Including memory paged to disk?

Private bytes

Includes memory allocated (even if not in use)

No

Yes

Working set

Only includes memory in use

Yes

No

Virtual bytes

Only includes memory in use

Yes

Yes

Private working set
(Unavailable in ANTS Memory Profiler)

Only includes memory in use

No

No

Performance Monitor (perfmon.exe) has a performance counter called # Bytes in all heaps, which is part of the .NET CLR Memory object.

The value of the Performance Monitor # Bytes in all heaps counter is often larger than the ANTS Memory Profiler # Bytes in all heaps counter. The discrepancy is caused because the Performance Monitor # Bytes in all heaps counter includes memory allocated to the .NET heaps but which is not being used, whilst the ANTS Memory Profiler # Bytes in all heaps only includes memory that is both allocated and in use.

 

posted @ 2011-12-26 19:56 TerryGao 阅读(163) 评论(0) 编辑

2010年1月13日 #

摘要: http://social.msdn.microsoft.com/forums/en-US/wcf/thread/84551e45-19a2-4d0d-bcc0-516a4041943d/Brief summary of binding timeout knobs...Client side:SendTimeout is used to initialize the OperationTimeou...阅读全文
posted @ 2010-01-13 13:43 TerryGao 阅读(184) 评论(1) 编辑

2010年1月8日 #

摘要: 【IT168 专稿】http://tech.it168.com/msoft/2008-01-25/200801251222224.shtml 随着.NET的推出,微软引入了一套新的通讯技术:Web Services和.NET remoting。.NET remoting和ASP.NET Web Services可以为建立分布式的应用提供强有力的支持。因此,为了在我们的应用程序中选择合适的技术,充分...阅读全文
posted @ 2010-01-08 16:05 TerryGao 阅读(339) 评论(0) 编辑

2010年1月6日 #

摘要: http://msdn.microsoft.com/zh-cn/library/aa702636.aspx 本主题以问答形式描述出现的一些最常见问题、它们的解决方法以及可以从何处找到关于这些问题的更多信息。 问题 问:如果我的客户端在第一次请求后暂时处于空闲,有时我会在第二次请求时收到 MessageSecurityException。发生了什么情况? 第二次请求失败主要有两个原因:(1) 会话已...阅读全文
posted @ 2010-01-06 01:12 TerryGao 阅读(190) 评论(0) 编辑

2009年12月8日 #

摘要: 为什么需要使用序列化,以及序列化和反序列化的使用阅读全文
posted @ 2009-12-08 01:25 TerryGao 阅读(240) 评论(0) 编辑

2009年2月24日 #

摘要: 最近在做有关WCF的系统,可能是在方法回调的过程中会默认通过TCP:80端口,报错为80端口被占用,然而我又不知道什么程序占用了80端口,上网一找,没想真不少人碰到我一样的问题,嘿嘿。run "netstat -ano" on DOS, andthen you can see all ports being used, find the port you want to see, remember...阅读全文
posted @ 2009-02-24 14:33 TerryGao 阅读(2130) 评论(1) 编辑

2008年7月22日 #

摘要: abstract class和interface是Java语言中对于抽象类定义进行支持的两种机制,正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。 abstract class和interface之间在对于抽象类定义的支持方面具有很大的相似性,甚至可以相互替换,因此很多开发者在进行抽象类定义时对于 abstract class和interface的选择显得比较随意。 其实,两者之间还是有很大的区别的,对于它们的选择甚至反映出对于问题领域本质的理解、对于设计意图的理解是否正确、合理。本文将对它们之间的区别进行一番剖析,试图给开发者提供一个在二者之间进行选择的依据。 阅读全文
posted @ 2008-07-22 16:57 TerryGao 阅读(186) 评论(0) 编辑

摘要: 概念,三个点: 1.抽象类不能被实例化; 2.子类必须重写父类中的抽象方法; 3.如果类中包括抽象方法,那么该类必须被定义为抽象类,而不论是否包括其他一般方法。 宗旨:抽象类应尽可能拥有更多的共同代码,更少的数据。 表现: 关键字:abstract、override。 抽象方法不能有方法体,以“;”结尾,没有“{}”。阅读全文
posted @ 2008-07-22 15:48 TerryGao 阅读(275) 评论(1) 编辑

摘要: 封装:每个对象都包括自己进行操作所需要的所有信息,而不依赖于其他对象来完成自己的操作。这样的方法和属性通过类的实例来实现。 好处:良好的封装可以降低耦合度;类的内部可以自由修改;类具有对外的清晰...阅读全文
posted @ 2008-07-22 12:12 TerryGao 阅读(3586) 评论(0) 编辑

2008年7月21日 #

摘要: new 关键字可以显式隐藏从基类继承的成员。隐藏继承的成员意味着该成员的派生版本将替换基类版本。也就说在使用派生类的方法是调用的方法是New关键字新定义出来的方法,而不是基类的方法。 在不使用 new 修饰符的情况下隐藏成员是允许的,但会生成警告。使用 new 显式隐藏成员会取消此警告,并记录代之以派生版本这一事实...阅读全文
posted @ 2008-07-21 16:58 TerryGao 阅读(260) 评论(0) 编辑