Chinaunix首页 | 论坛 | 博客
  • 博客访问: 256770
  • 博文数量: 60
  • 博客积分: 1222
  • 博客等级: 少尉
  • 技术积分: 585
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-16 17:28
个人简介

从学通信的博士到从事IT行业的工程师 从原华为项目经理,到现任职公司架构师

文章分类

全部博文(60)

文章存档

2013年(18)

2012年(42)

我的朋友

发布时间:2012-12-23 20:29:27

chain of responsibilityWhen one object does not know which specific object will handle its request, the chain of responsibility can be used to forward request among all possible receivers to get final destination. The receivers are normally from same class hirarchy whose base class is one action-han......【阅读全文】

阅读(795) | 评论(0) | 转发(0)

发布时间:2012-12-23 20:26:23

Factory method is virtual method to create local-specific object in the class hierarchy. The base class may or not implement it.If a parameter is passed to create method to create product by calling its virtual methods.this is abstract factory. The client can get all components from abstra......【阅读全文】

阅读(719) | 评论(0) | 转发(0)

发布时间:2012-12-23 20:23:15

The decorator has same interfaces to component to which it enhances functions or appearance. It is also called wrapper. With this pattern, client does not need to subclass or change components it uses.The decorator owns reference to component it decorates. The client references one compone......【阅读全文】

阅读(819) | 评论(0) | 转发(0)

发布时间:2012-12-23 20:17:11

Bridge pathern is used to decouple abstraction and implementation so that both can involve independently. This makes it easy to modify, extend and reuse abstraction and implementation independently.Abstraction owns one reference of implementer. Client does not know which implementer it is handling. ......【阅读全文】

阅读(912) | 评论(0) | 转发(0)

发布时间:2012-12-23 20:10:12

之前有个小项目,具体需求是:完成一个客户端,按照某一速度向服务器发送Radius请求,并处理服务器返回的响应.实现方案:采用多线程方式实现,每个线程负责发送请求,并等待服务器返回的响应. 测试发现,发送速度达到某个值时就无法增加了,日志显示内存不够,无法创建更多线程. 进而发现可以创建不到400个线程. 实际上,这里的内存不足是指虚拟内存不足(这个项目里每个线程需要的物理内存很小),对于32位系统,虚拟内存空间大约4G, 其中低3G内存空间分配给用户空间(windows通常分配2G空间给用户空间)此外,进程每创建一个线程,会分配固定大小的虚拟空间作为线程的栈空间(通常是8M......【阅读全文】

阅读(1739) | 评论(0) | 转发(1)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册