1、2之间的差别:
又见指针的bug:
1、rbd_image_t image; //声明一个对象,&image是对象的地址
rt_num = rbd_open(io, name, &image, NULL);
2、rbd_image_t * image; //声明一个指针,linux下该指针指向NULL;
rt_num = rbd_open(io, name, image, NULL); //直接宕掉;
http://www.linuxidc.com/Linux/2015-03/114717.htm
http://blog.sina.com.cn/s/blog_4b6f784001011yvh.html
ceph存储集群API:
apt-get install librados-dev (ubuntu)
apt-get install librados2-devel (centos)
valgrind
valgrind --tool=memcheck --leak-check=yes ./程序名
有个叫trash-cli的小工具可以在终端下操纵回收站,
安装方法: sudo apt-get install trash-cli
trash-list列出回收站文件
trash-empty清空回收站
trash-put删除文件到回收站
.bashrc加入 alias rm=trash-put
http://www.hegouvip.com/forum-175-1.html