俊's profileAVALONPhotosBlogLists Tools Help

俊 章

Occupation

Windows Media Player

No list items have been added yet.
No list items have been added yet.

AVALON

The world is not small,you are!
July 03

现已停止更新

     本博客先已停止更新,请到http://hi.baidu.com/avalon3515浏览
May 04

uTorrent

今天发现了一个非常棒的BT软件µTorrent,其官方网站为http://www.utorrent.com/,其最大的优点就是资源占用率小,可以说小到惊人,一般情况下只占用7M左右的内存,极少超过20M的。这一方面是此软件确实非常优秀,一共只有一个执行文件且只有201K,而且所有功能一应俱全,甚至支持换肤这种娱乐功能。而看看BitComet那6.05M的庞大体积,真是让人感到µTorrent的代码编写之优秀。而最能体现这一点的就是其缓存利用率之高,在BitComet下一般都要占用20M以上的缓存,甚至60M以上也很正常,但是µTorrent却一般只用不到3M,这完全取决与算法与代码。µTorrent对内存的控制完全称得上炉火纯青,充分利用,迅速释放并且十分稳定,几乎没有出现过内存泄漏,可以称得上完美。

[11:40:16]    Proc heap:
[11:40:16]      422: USED: 32
[11:40:16]      260: USED: 12
[11:40:16]       91: FREE: 104
[11:40:16]       74: USED: 24
[11:40:16]       67: FREE: 24
[11:40:16]       60: USED: 36
[11:40:16]       60: USED: 34
[11:40:16]       57: FREE: 248
[11:40:16]       54: USED: 16
[11:40:16]       52: USED: 33
[11:40:16]       49: FREE: 152
[11:40:16]       48: FREE: 120
[11:40:16]       46: FREE: 160
[11:40:16]       46: FREE: 136
[11:40:16]       45: FREE: 144
[11:40:16]       45: FREE: 128
[11:40:16]       45: FREE: 56
[11:40:16]       44: USED: 216
[11:40:16]       43: FREE: 176
[11:40:16]       40: USED: 104
[11:40:16]       38: FREE: 192
[11:40:16]       37: USED: 20
[11:40:16]       36: USED: 96
[11:40:16]       35: FREE: 208
[11:40:16]       33: FREE: 184
[11:40:16]       31: FREE: 112
[11:40:16]       31: FREE: 88
[11:40:16]       30: FREE: 1024
[11:40:16]       30: FREE: 232
[11:40:16]       30: FREE: 72
[11:40:16]       28: FREE: 1088
[11:40:16]       28: FREE: 216
[11:40:16]       27: FREE: 4608
[11:40:16]       27: FREE: 2304
[11:40:16]       27: FREE: 240
[11:40:16]       27: FREE: 200
[11:40:16]       26: FREE: 288
[11:40:16]       26: FREE: 16
[11:40:16]       25: USED: 64
[11:40:16]       25: FREE: 2432
[11:40:16]       25: FREE: 224
[11:40:16]       24: USED: 4
[11:40:16]       24: FREE: 544
[11:40:16]       24: FREE: 40
[11:40:16]       23: USED: 48
[11:40:16]       23: USED: 10
[11:40:16]       23: FREE: 672
[11:40:16]       23: FREE: 576
[11:40:16]       23: FREE: 80
[11:40:16]       22: FREE: 256
[11:40:16]       21: USED: 904
[11:40:16]       21: USED: 45
[11:40:16]       21: USED: 40
[11:40:16]       21: FREE: 336
[11:40:16]       21: FREE: 320
[11:40:16]       20: USED: 8
[11:40:16]       20: FREE: 704
[11:40:16]       20: FREE: 272
[11:40:16]       19: FREE: 608
[11:40:16]       17: USED: 80
[11:40:16]       17: USED: 46
[11:40:16]       17: FREE: 304
[11:40:16]       16: USED: 68
[11:40:16]       16: FREE: 14848
[11:40:16]       16: FREE: 432
[11:40:16]       16: FREE: 168
[11:40:16]       15: USED: 47
[11:40:16]       15: FREE: 960
[11:40:16]       15: FREE: 800
[11:40:16]       15: FREE: 464
[11:40:16]       13: USED: 100
[11:40:16]       13: USED: 60
[11:40:16]       13: FREE: 32
[11:40:16]       12: USED: 396
[11:40:16]       12: USED: 128
[11:40:16]       12: USED: 120
[11:40:16]       12: USED: 66
[11:40:16]       12: USED: 14
[11:40:16]       12: FREE: 1600
[11:40:16]       12: FREE: 928
[11:40:16]       12: FREE: 48
[11:40:16]       11: USED: 56
[11:40:16]       11: USED: 18
[11:40:16]       11: FREE: 2688
[11:40:16]       11: FREE: 1280
[11:40:16]       11: FREE: 1216
[11:40:16]       11: FREE: 8
[11:40:16]       10: USED: 200
[11:40:16]       10: USED: 42
[11:40:16]       10: USED: 2
[11:40:16]       10: FREE: 5632
[11:40:16]       10: FREE: 1472
[11:40:16]       10: FREE: 64
[11:40:16]        9: USED: 256
[11:40:16]        9: USED: 88
[11:40:16]        9: USED: 28
[11:40:16]        8: USED: 1556
[11:40:16]        8: USED: 132
[11:40:16]        8: USED: 43
[11:40:16]        7: USED: 596
[11:40:16]        7: USED: 264
[11:40:16]        7: USED: 224
[11:40:16]        7: USED: 220
[11:40:16]        7: USED: 144
[11:40:16]        7: USED: 38
[11:40:16]        6: USED: 248
[11:40:16]        6: USED: 164
[11:40:16]        6: FREE: 400
[11:40:16]        5: USED: 772
[11:40:16]        5: USED: 184
[11:40:16]        5: USED: 76
[11:40:16]        5: USED: 44
[11:40:16]        5: USED: 30
[11:40:16]        4: USED: 1016
[11:40:16]        4: USED: 296
[11:40:16]        4: USED: 238
[11:40:16]        4: USED: 228
[11:40:16]        4: USED: 180
[11:40:16]        4: USED: 71
[11:40:16]        4: USED: 70
[11:40:16]        4: USED: 61
[11:40:16]        4: USED: 22
[11:40:16]        4: FREE: 0
[11:40:16]        3: USED: 16376
[11:40:16]        3: USED: 576
[11:40:16]        3: USED: 572
[11:40:16]        3: USED: 126
[11:40:16]        3: USED: 116
[11:40:16]        3: USED: 84
[11:40:16]        3: USED: 72
[11:40:16]        3: USED: 69
[11:40:16]        3: USED: 65
[11:40:16]        3: USED: 63
[11:40:16]        3: USED: 58
[11:40:16]        3: USED: 52
[11:40:16]        3: FREE: 96
[11:40:16]        2: USED: 8184
[11:40:16]        2: USED: 4088
[11:40:16]        2: USED: 2344
[11:40:16]        2: USED: 1152
[11:40:16]        2: USED: 788
[11:40:16]        2: USED: 720
[11:40:16]        2: USED: 538
[11:40:16]        2: USED: 464
[11:40:16]        2: USED: 420
[11:40:16]        2: USED: 388
[11:40:16]        2: USED: 332
[11:40:16]        2: USED: 300
[11:40:16]        2: USED: 292
[11:40:16]        2: USED: 208
[11:40:16]        2: USED: 196
[11:40:16]        2: USED: 192
[11:40:16]        2: USED: 160
[11:40:16]        2: USED: 136
[11:40:16]        2: USED: 67
[11:40:16]        2: USED: 62
[11:40:16]        2: USED: 50
[11:40:16]        2: USED: 39
[11:40:16]        2: USED: 37
[11:40:16]        2: USED: 35
[11:40:16]        2: USED: 31
[11:40:16]        2: USED: 26
[11:40:16]        1: USED: 262136
[11:40:16]        1: USED: 131064
[11:40:16]        1: USED: 65528
[11:40:16]        1: USED: 25136
[11:40:16]        1: USED: 24036
[11:40:16]        1: USED: 14720
[11:40:16]        1: USED: 6144
[11:40:16]        1: USED: 5424
[11:40:16]        1: USED: 4600
[11:40:16]        1: USED: 3456
[11:40:16]        1: USED: 2600
[11:40:16]        1: USED: 2216
[11:40:16]        1: USED: 2040
[11:40:16]        1: USED: 1964
[11:40:16]        1: USED: 1728
[11:40:16]        1: USED: 1436
[11:40:16]        1: USED: 1252
[11:40:16]        1: USED: 1200
[11:40:16]        1: USED: 1172
[11:40:16]        1: USED: 1032
[11:40:16]        1: USED: 1000
[11:40:16]        1: USED: 960
[11:40:16]        1: USED: 946
[11:40:16]        1: USED: 900
[11:40:16]        1: USED: 816
[11:40:16]        1: USED: 728
[11:40:16]        1: USED: 684
[11:40:16]        1: USED: 680
[11:40:16]        1: USED: 644
[11:40:16]        1: USED: 528
[11:40:16]        1: USED: 524
[11:40:16]        1: USED: 520
[11:40:16]        1: USED: 480
[11:40:16]        1: USED: 352
[11:40:16]        1: USED: 320
[11:40:16]        1: USED: 316
[11:40:16]        1: USED: 308
[11:40:16]        1: USED: 293
[11:40:16]        1: USED: 288
[11:40:16]        1: USED: 272
[11:40:16]        1: USED: 260
[11:40:16]        1: USED: 240
[11:40:16]        1: USED: 190
[11:40:16]        1: USED: 176
[11:40:16]        1: USED: 168
[11:40:16]        1: USED: 152
[11:40:16]        1: USED: 148
[11:40:16]        1: USED: 140
[11:40:16]        1: USED: 124
[11:40:16]        1: USED: 112
[11:40:16]        1: USED: 106
[11:40:16]        1: USED: 99
[11:40:16]        1: USED: 98
[11:40:16]        1: USED: 94
[11:40:16]        1: USED: 92
[11:40:16]        1: USED: 77
[11:40:16]        1: USED: 74
[11:40:16]        1: USED: 54
[11:40:16]        1: USED: 51
[11:40:16]        1: USED: 29
[11:40:16]        1: USED: 6
[11:40:16]        1: USED: 1
[11:40:16]        1: FREE: 28656
[11:40:16]        1: FREE: 24560
[11:40:16]        1: FREE: 784
[11:40:16]        1: FREE: 664
[11:40:16]        1: FREE: 624
[11:40:16]        1: FREE: 448
[11:40:16]        1: FREE: 360
[11:40:16]    1836/1599 blocks. 799403/1050008 bytes.
以上是从其log中节选的一段Dump Memeroy Info,这只是在一秒钟内的操作,在整个运行过程中就是依靠这种高效稳定的内存利用,使其整个软件的内存占用量控制在了一个非常好的范围内,这是BitComet这一类软件完全所不能比的,而这仅仅是由201K的软件完成的,µTorrent从技术上说确实是我见过的最优秀的软件之一。

April 25

古艳歌

茕茕白兔,
东走西顾。
衣不如新,
人不如故。
 
高田种小麦,
终久不得穗。
男儿在他乡,
焉能不憔悴。

复试归来

今天终于从南京复试回来了。
当还没有考上研究生的时候,总是对考上后的心情充满了期待与好奇,但是当考上了以后,去发现竟然是有一些空虚,迷茫,甚至有些无聊。
不知道为什么会有这种感觉。
但未来不可知,是我们前进的动力。
自己努力了,就会问心无愧吧!
March 10

我就要沉默了 普希金

         我就要沉默了

我就要沉默了!然而,假如这琴弦
能在我忧伤时报我以低回的歌声;
假如有默默聆听我的男女青年
曾感叹于我的爱情的长期苦痛;
假如你自己,在深深的感动之余,
能将我悲哀的诗句悄悄地低吟,
并且喜欢我心灵的热情的言语……
假如你是爱着我……哦,亲爱的友人,
请允许我以痴情怨女的圣洁之名
使这竖琴的临终一曲充满柔情!……
于是,等死亡的梦覆盖着我永眠,
你就可以在我的墓瓮前,感伤地说:
“我爱过他,是我给了他以灵感,
使他有了最后的爱情,最后的歌。”

February 27

Windows Messages(终于看到Lession 5了)

A message to Windows must provide four pieces of information:

  • WHO sent the message? Every object you will need in your program, just like everything in the computer, must have a name. The operating system needs this name to identify every object, for any reason. An object in Microsoft Windows is identified as a Handle. For Windows controls, the handle is called HWND
  • WHAT message? The object that sends a message must let the operating system know what message it is sending. As we will learn, there are various types of messages for different circumstances. Nevertheless, to make matters a little easier, each message is a constant positive natural number (unsigned int) identified with a particular name. Therefore, the message identifier is passed as UINT
  • Accompanying items: Because there are so many types of messages, you must provide two additional pieces of information to help process the message. These two items depend on the type of message and could be anything. The first accompanying item is a 32-bit type (unsigned int) called WPARAM (stands for WORD Parameter; in other words, it is a WORD (unsigned int) argument). The second accompanying item is a 32-bit type of value (long) calle LPARAM (stands for LONG Parameter; in other words, it is a LONG (long in C/C++) argument). Remember that these two can be different things for different messages.
 

Windows程序的消息处理过程(Win32 Tutorial - Lesson 1读后感)

  根据http://www.functionx.com/win32/Lesson01c.htm的描述,大概可以知道消息的传递与处理过程。首先是application都有其对应的
window procedure,当窗口显现出来以后,对窗口所做的操作就会作为消息传递给application,而application就用GetMessage() 函数来接收,接着application则必须对消息进行分析,这使用TranslateMessage() 来实现,接着application就要把分析后的消息传递给此application的window procedure,即lpfnWndProc所指定的处理过程,要使用DispatchMessage() 来实现,而window procedure则会根据收到的消息作出具体的措施。到此为止已经形成了一个完整的消息处理循环,其形式如下所示:
while( GetMessage(&Msg, NULL, 0, 0) )
{
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
}
  这便是典型的windows应用程序的消息处理与传递机制。
February 26

今天开始重新学习win32编程了

  今天下午终于开始学习了。
  上一次看《Windows程序设计》好像是大二的时候了,现在想想那时虽然迷茫,虽然什么都不懂,但却是好奇心最重的时候,也是干劲最足的时候,好像总有用不完的精力。但是必须承认,那时只能说对编程有了一个总体的认识,实际上许多内容却完全是一知半解,所以现在时隔几年再看,认识却深了许多。
  今天虽然看的已经不是那本书,但是http://www.functionx.com/确实值得一看!
  也许我是一个脑子很笨的人,但我相信“勤能补拙是良训,一分辛苦一分才”这句话是不会错的!
  明天还要继续努力!
 
February 25

使用VC时出现error spawning cl.exe解决方法

  今天虽然是第一次遇到这个问题,但是终于找到了一个最好也是最简便的方法:
  启动VC时不要用图形界面,通过在命令提示符下输入:Msdev /useenv运行.它会强制使系统环境变量全高设置成正确值.而且,只需要使用一次这样的方式运行VC,以后再次通过双击图标的方式启动也不会有问题.
  看来自己还要有许多东西要学呀!
 
Photo 1 of 66