岚天逸见

上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 78 下一页

2015年10月20日 #

编译期强制函数参数为字符串常量

摘要: 设计一函数f(),使用得下面代码中的第一个f()调用可正常编译,而其它编译报错#include #include int main(){ f("hello"); // 正常编译通过 const char* str1 = "hello"; f(... 阅读全文

posted @ 2015-10-20 17:44 岚天逸见 阅读(238) 评论(0) 推荐(0)

2015年10月9日 #

arean.c

摘要: glibc-2.14中的arean.c源代码,供研究malloc和free实现使用:/* Malloc implementation for multiple threads without lock contention. Copyright (C) 2001,... 阅读全文

posted @ 2015-10-09 15:48 岚天逸见 阅读(183) 评论(0) 推荐(0)

malloc.c

摘要: glibc-2.14中的malloc.c源代码,供研究malloc和free实现使用:/* Malloc implementation for multiple threads without lock contention. Copyright (C) 1996... 阅读全文

posted @ 2015-10-09 15:46 岚天逸见 阅读(724) 评论(0) 推荐(0)

__lll_mutex_lock_wait的错误原因

摘要: 1. x86_64栈(glib 2.4):free时:(gdb) bt#0 0x00002b9405ea1c38 in __lll_mutex_lock_wait () from /lib64/libc.so.6#1 0x00002b9405e45e5f in _... 阅读全文

posted @ 2015-10-09 15:35 岚天逸见 阅读(443) 评论(0) 推荐(0)

2015年9月25日 #

rapidjson常见使用示例

摘要: rapidjson相比jsoncpp性能高出太多,使用接口一样的简单的。官方中文帮助文档:http://rapidjson.org/zh-cn/。rapidjson的Move语意,请浏览http://rapidjson.org/zh-cn/md_doc_tutoria... 阅读全文

posted @ 2015-09-25 19:19 岚天逸见 阅读(8648) 评论(0) 推荐(0)

2015年9月22日 #

如何取得nginx做反向代理时的真实IP?

摘要: 1. 编译对于client -> nginx reverse proxy -> apache,要想在程序中取得真实的IP,在执行nginx的configure时,必须指定参数“--with-http_realip_module”,示例:./configure --pr... 阅读全文

posted @ 2015-09-22 18:10 岚天逸见 阅读(463) 评论(0) 推荐(0)

2015年9月19日 #

程序员不常用Linux命令集

摘要: 1) 关闭指定网卡,如关闭网卡eth0ifconfig eth0 down也可以使用ifdown,通常ifdown是一个指向ifup的软链接,而ifup为一个脚本文件。2) 命令自启动,如希望机器重启时自动关闭网卡eth0这个只需要在文件/etc/rc.d/rc.lo... 阅读全文

posted @ 2015-09-19 11:08 岚天逸见 阅读(192) 评论(0) 推荐(0)

2015年9月18日 #

再议GCC编译时的静态库依赖次顺问题

摘要: 假设有如三个源代码文件:$ cat a.cppvoid a(){} $ cat b.cppextern void a();void b(){ a(); // 调用a.cpp中的a()} $ cat x.cppextern void b();int main(){... 阅读全文

posted @ 2015-09-18 15:49 岚天逸见 阅读(889) 评论(0) 推荐(0)

2015年9月15日 #

pthread_rwlock_rdlock和“No such file or directory”

摘要: pthread_rwlock_rdlock和“No such file or directory”调用pthread_rwlock_rdlock时,如果失败报错“pthread_rwlock_rdlock”,则可能是因为对同一把锁先加了写锁,再加读锁时就报这个错误了。... 阅读全文

posted @ 2015-09-15 17:38 岚天逸见 阅读(354) 评论(0) 推荐(0)

2015年9月8日 #

Thrift线程和状态机分析

摘要: 目录目录 11. 工作线程和IO线程 12. TNonblockingServer::TConnection::transition() 23. RPC函数被调用过程 34. 管道和任务队列 45. 对象间关系 56. 相关代码摘要 6 1. 工作线程和IO线程启动T... 阅读全文

posted @ 2015-09-08 21:59 岚天逸见 阅读(809) 评论(0) 推荐(0)

上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 78 下一页

导航