
Programming
gangban_lau
这个作者很懒,什么都没留下…
展开
-
Ctags
host$ cd $SOURCE_DIR_TOP_LEVELhost$ ctags -Rhost$ vi source/example.c 想要觀看get_option這個識別子定義的地方,將游標移到該識別子上,再按Ctrl+]。如欲知道哪些地方呼叫該識別子,將游標移到該識別子上,按Ctrl+/,再按c即可。Ctrl+/,再按s則搜尋該識別子出現的地方To return原创 2009-06-17 17:12:00 · 588 阅读 · 0 评论 -
C++ 模板放置在 .h 文件中的一个原因
一直没有对 C++ 模板做过系统的学习,对于 STL 模板类或者函数,都是查查文档就直接使用。不过在翻开 STL 代码的时候,都曾注意到那些模板是放置在.h文件中的,至于为何,却是没有去想过。今天在编写一个动态连接库的时候,才明白其中的原因。比如库里面有下面模板类 template class concurrent_queue{public: concurrent_q原创 2010-03-05 16:04:00 · 1558 阅读 · 2 评论 -
cpulimit-ng
cpulimit-ng at googlecodeBased on sourceforge cpulimit project. Many bug fixed.below information is from cpulimit@sfWhat is it? cpulimit is a simple program which attempts to limit the cpu usa原创 2012-01-18 09:27:43 · 1774 阅读 · 0 评论 -
MSYS
UPDATE 2011-08-18 we could use Automated MinGW Installer now! MSYS, a contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft原创 2009-10-17 13:30:00 · 647 阅读 · 0 评论 -
优快云 的评论有数字限制?
<br />优快云 的评论有数字限制?<br /> <br />http://blog.youkuaiyun.com/pennyliang/archive/2010/11/10/5999933.aspx<br /> <br />基于我的知识局限,没有看到过 c 或者 c++ 标准声明 size_t 的访问是原子操作,我觉得这是依赖编译器实现以及底层的硬件体系的。也许有个实现碰巧出现 size_t 需要两次 bus access才能取到完整的值。按照对当前环境体系的操作理解,在没有前提的条件下,就断定“显然是原子操作”原创 2010-11-10 18:40:00 · 2750 阅读 · 1 评论 -
ERROR: ld.so: object 'libXXX32.so' from LD_PRELOAD cannot be preloaded: ignored.
在 x86_64 版本的 centos 5.x 运行 32 bit 的某程序,该程序需要利用 LD_PRELOAD 预先加载 libXXX32.so,也是 32 bit 的版本。但是每次运行的时候,都会出现上面的提示,让我以为预先加载失败。google 了一把,发现这个链接 ld.so too verbose when it cant LD_PRELOAD a 32 bit librar原创 2010-02-10 10:28:00 · 19475 阅读 · 0 评论 -
MSYS - OpenSSL
It is easy to install openssl package into msys if you use openssl-msys release.Download 5 files from http://sourceforge.net/projects/mingw/files/ libopenssl-0.9.8k-1-msys-1.0.11-dev.tar原创 2009-10-21 23:28:00 · 991 阅读 · 0 评论 -
Cross compile - scratchbox
前面提到过利用 crosstool 快速编译 cross compiler,对于简单的没有太多外部依赖的程序来说,这已经足够了。但是对于基于 GNU autotools 进行配置编译的软件包来说,常常会因为关联到 HOST 上的外部依赖库文件,因此要求我们先要用 cross compiler 编译这些外部依赖库,然后修改或者配置该软件包的外部关联库的查找路径。另外configure通常会利用小程序原创 2009-10-14 13:07:00 · 1781 阅读 · 2 评论 -
Cross compiler
今天需要帮一台 RedHat AS3 服务器更新 SIP 信令处理软件,因为手头没有类似 OS 的编译机器,于是在 CentOS 4 的机器上用 crosstool 编译一个 cross compiler。crosstool 可以大大简化其中的过程。 wget http://kegel.com/crosstool/crosstool-0.43.tar.gztar -xzvf cross原创 2009-06-25 17:15:00 · 195 阅读 · 0 评论 -
Apache APR memory pool 的一点见解
APR 是 Apache Portable Runtime project 的简称,对于 APR 是否值得作为日常开发工具箱里面的一员,我不做太多的评价,对于 APR 1.x 过分依赖 memory pool 的讨论也很多,各位自行去实践。对于 APR,我并没有太多关注它的 portable,日常用的较多的是它的 memory pool 实现。memory pool 可以帮助我们在有限的开销下原创 2012-03-14 12:17:04 · 2939 阅读 · 0 评论