- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 Code Profling tools in Linux
1. gprof2. valgrindvalgrind --tool=callgrind ./(Your binary)Gprof2Dot is a tool for visulization3. google-perftools4.You can use callgrind. Together with KCacheGrind5. Newer
2015-07-30 11:50:11 786
转载 GPROF Tutorial – How to use Linux GNU GCC Profiling Tool
by Himanshu Aroraon August 10, 2012Profiling is an important aspect of software programming. Through profiling one can determine the parts in program code that are time consuming and need to
2015-07-30 11:29:07 790
原创 查看C++类的虚表(vtable)结构
假定源文件如下:#include #include class IA{public:virtual ~IA() {}virtual void PrintA() = 0;virtual void PrintB() = 0;virtual void PrintC() = 0;};class A : public IA{public:A();~A();void Pr
2015-07-22 09:01:17 2945
原创 Grab the key in X11
本文是搜集网上的资料整理而成的。方法1:#include #include main(){ Window root; XEvent e; int F2,F3,F4,F5,F6; // Open the display Display *dpy = XOpenDisplay(0); if (!dpy)return; // Get the root w
2015-07-18 23:19:21 1505 1
原创 c++ 11 thread 初试
最新的 c++11标准整合进了 线程支持,下面写一个小程序测试一下。测试代码:#include #include void hello(void){ std::cout << "Hello concurrent world" << std::endl;}int main(void){ std::thread t(hello); t.join();}编译方法:
2015-07-15 01:31:55 1547
原创 std::string crash的问题
今天遇到一个 std::string 字符串crash的问题。问题代码如下面:#include int main(void){ std::string str; char *str2 = 0x00; str = str + "hello" + str2; return 0;}crash的时候,调用栈如下:(gdb) bt full#0 strlen ()
2015-07-13 00:53:21 7767
转载 The virtual table
To implement virtual functions, C++ uses a special form of late binding known as the virtual table. Thevirtual table is a lookup table of functions used to resolve function calls in a dynamic/late b
2015-07-11 16:12:12 649
Algorithm (4th), by Robert Sedgewick
2012-04-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人