自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小猪爱拱地

勤奋和毅力是通向成功的阶梯

  • 博客(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

Amazon 五星书。 Classic Reference The latest version of Sedgewick’s best-selling series, reflecting an indispensable body of knowledge developed over the past several decades. Broad Coverage Full treatment of data structures and algorithms for sorting, searching, graph processing, and string processing, including fifty algorithms every programmer should know. See algs4.cs.princeton.edu/code. Completely Revised Code New Java implementations written in an accessible modular programming style, where all of the code is exposed to the reader and ready to use.

2012-04-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除