上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 文档选项未显示需要 JavaScript 的文档选项打印本页 将此 页作为电子邮件发送样例代码http://www.ibm.com/developerworks/cn/linux/l-cn-optimization/index.html级 别: 中级杨 小华 (normalnotebook@126.com), 软件工程师2008 年 11 月 17 日大家也许还记得 2005 年 3 月 ... 阅读全文
posted @ 2010-06-23 22:42 史莱姆 阅读(416) 评论(0) 推荐(0) 编辑
摘要: http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3Content: The ProblemWhat is PIC?What are "relocations"?Case 1: Broken compilerCase 2: Broken `-fPIC' support checks in config... 阅读全文
posted @ 2010-06-23 02:50 史莱姆 阅读(723) 评论(0) 推荐(0) 编辑
摘要: OpenMP使用Fork-Join的并行执行模式。开始时由一个主线程执行程序,该线程一直串行地执行,直到遇到第一个并行化制导语句后才 开始并行执行。过程如下: ①Fork:主线程创建一队线程并行执行并行域中的代码;②Join:当各线程执行完毕后被同步或中断,最后又只有主线程在执行。   OpenMP的编程相对简单,充分利用了共享存储体系结构的特点,避免了消息传递的开销。虽... 阅读全文
posted @ 2010-06-18 05:25 史莱姆 阅读(404) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-newif 'Test' is an ordinary class, is there any difference between:Sometimes the memory returned... 阅读全文
posted @ 2010-06-14 22:48 史莱姆 阅读(184) 评论(0) 推荐(0) 编辑
摘要: std::endl 会调用 std::flush(), 这个操作在我的机器上平均 20 macros"\n" 不会调用std::flush(),这个操作在我的机器上平均 5 macros 而 close 操作也会调用flush ,所以最好尽可能的减少std::endl的调用 阅读全文
posted @ 2010-04-30 01:06 史莱姆 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--#ifdef_MSC_VERBOOLWINAPIconsole_handler(DWORDcevent){switch(cevent){caseCTRL_C_EVENT:caseCTRL_BREAK_... 阅读全文
posted @ 2010-04-30 00:57 史莱姆 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 这个bug搞了我两天, 大致就是说select 函数在linux 下 每次调用都会重置timeout参数值, 所以需要在每次调用select 函数之前, 重新设置timeout (window下面不会重置timeout)。-----------------------------------------------------------------------------------------... 阅读全文
posted @ 2010-04-01 23:45 史莱姆 阅读(465) 评论(0) 推荐(0) 编辑
摘要: http://www.think-async.com/Asio/Recipes?skin=clean.nat%2casio%2cpattern#A_thread_pool_for_executing_arbiCreate an io_service: and some work to stop its run() function from exiting if it has nothing el... 阅读全文
posted @ 2010-03-09 02:21 史莱姆 阅读(387) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/ywdblog/blog/item/592efccd4578b4560eb345a8.html这篇文章是从以前一个同事哪儿拷贝的,我们一起做过一次比较大的项目,那也是我第一次真正了解大型web应用. 现在有很多的网站应用都是基于LAMP的架构(M就是MySQL),为了缓解数据库的读取访问压力,通常都会使用缓存机制,也就是查询一次数据库后在一定失效期内多次使用... 阅读全文
posted @ 2010-03-09 00:33 史莱姆 阅读(854) 评论(0) 推荐(0) 编辑
摘要: http://hi.baidu.com/ywdblog/blog/item/85f0a2991623ae0e6e068c9a.html在高性能服务器中,一般采用非阻塞网络IO,单进程事件驱动的架构。这种架构的核心是事件驱动机制。目前Linux常用select,poll和epoll系统调用来完成事件驱动。select和poll是传统的unix事件驱动机制,但它们有很大的缺点:在大量的并发连接中,如果... 阅读全文
posted @ 2010-03-09 00:14 史莱姆 阅读(602) 评论(1) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页