- 博客(5)
- 收藏
- 关注
原创 arm linux 精准计算程序运行时间
#include <stdio.h>#include <sys/time.h>void main(){ struct timeval start,end; float timeuse; gettimeofday(&start,NULL); /* code . */...
2021-05-13 13:17:40
595
原创 linux下检测内存泄漏
linux下输入下载安装valgrindsudo apt-get install valgrind例:test.c#include <stdio.h>#include <stdlib.h>void main(){char* test =(char *)malloc(sizeof(char));}gcc test.c -o testvalgrind --leak-check=full ./test注:如果程序运行...
2021-05-13 09:58:23
127
原创 linux 使用标准V4L2获取一帧图片
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <assert.h>#include <getopt.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <malloc.h>#include <sys/stat.h&g
2021-05-11 16:17:25
1136
原创 ubuntu 根目录扩容
ubuntu 根目录扩容1.安装gpartedapt install gparted2.gparted 查看设备名字如右上角 我的是/dev/sda3.sudo parted /dev/sda /dev/sda改成相应的名字4.使用print命令查看5.删除不必要的分区因为硬盘的存储空间是要连续的,如上图,如果要扩容/dev/sda1 则需要把/dev/sda1右边的都删除掉,有Mount Point的可以先umount掉,然后再delete掉6.扩容右...
2021-05-10 11:02:39
1994
原创 linux安装并修改默认编码
linux安装并修改默认编码locale -a获取到当前已经安装的编码集sudo locale-gen zh_CN.UTF-8安装zh_CN.UTF-8字符集然后重新locale -a查看是否已经安装成功临时更改默认编码exportLANG=zh_CN.UTF-8locale-genlocale就会查看到已经更改成功。如果想永远更改即在/etc/profile文件最后一行添加exportLANG=zh_CN.UTF-8...
2021-05-07 11:50:54
307
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人