
linux
kacakaca-gogogo
这个作者很懒,什么都没留下…
展开
-
杂网络方面
MTU, MSS,IPv4 最小重组缓冲区原创 2022-01-07 11:51:07 · 1168 阅读 · 0 评论 -
Linux进程与线程
程序执行:进程与线程的主要区别:进程是资源(存储资源)分配的单位,而线程是task调度(cpu)的单位进程进程是资源分配的基本单位,是由于每个进程都有自己的虚拟内存空间,都是独立寻址。这也是为什么需要有进程间通信的机制。进程的地址空间结构:进程的创建:创建虚拟内存空间,初始化页表目录,用于将虚拟内存空间映射到物理内存读取可执行文件头,创建可执行文件与虚拟内存空间的映射关系,用于之后缺页的时候将文件从磁盘载入物理内存将cpu的指令寄存器设置为进程执行的入口地址(还涉及上下文切换等)原创 2021-04-29 16:21:59 · 358 阅读 · 0 评论 -
Makefile相关
教程:https://seisman.github.io/how-to-write-makefile/rules.html-Wl, --as-needed和-Wl, --no-as-needed(LDFLAGS)https://my.oschina.net/yepanl/blog/2222870https://www.zhihu.com/question/52043468通过指定-Wl, --as-needed选项,在链接的过程中,链接器会检查所有的依赖库,没有被实际用到的动态库不会被链..原创 2021-01-12 16:46:56 · 339 阅读 · 2 评论 -
0.0.0.0 vs 127.0.0.1
127.0.0.1 vs 0.0.0.0 vs localhost区别:https://cloud.tencent.com/developer/article/10310201.若只想本机使用的服务,不允许同局域网的设备访问,使用:127.0.0.1或localhost (前提是已经做了host映射);2.若想本局域网的主机都可访问但外网不可访问,监听本主机的IP地址,例如:192.168.1.2;3.若想本局域网的主机和外网都可访问,监听0.0.0.0就可以总结:localhos..原创 2021-01-05 15:01:27 · 436 阅读 · 0 评论 -
编译grpc route_guide example的时候遇到#error This file was generated by an old version of protoc
编译grpc route_guide example的时候遇到#error This file was generated by an old version of protoc原因:系统中有两个protoc版本(之前下载了protobuf的git,当时编译安装了一遍。然后下grpc的git,在编译的时候按照教程使用“cmake -DgRPC_INSTALL=ON …”之后make install又安装了一遍。)解决:把route_guide example 中的Makefile的protoc版本改原创 2021-01-04 11:25:15 · 468 阅读 · 0 评论 -
解决symbol lookup error, undefined symbol: _ZN9grpc_impl7Channel8GetStateEb
问题:在run ./test的时候出现“symbol lookup error, undefined symbol: _ZN9grpc_impl7Channel8GetStateEb”解决:观察这个symbol, 发现应该是在grpc的库中,因此:ldd ./test | grep grpc找到了libgrpc++.so.1 => /usr/local/lib/libgrpc++.so.1, 然后产看这个库里是否有这个symbol:nm -D /usr/local/lib/libgrpc+原创 2020-09-17 17:19:45 · 19699 阅读 · 0 评论 -
安装配置运行android studio on ubuntu
安装a) 安装java jdk下载jdkhttps://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html 或者 https://repo.huaweicloud.com/java/jdk/8u202-b08/解压tar -xzvf jdk-8u202-linux-x64.tar.gz修改环境变量sudo vi ~/.bashrc在文件末尾添加 export JAVA_HOME=..原创 2020-08-28 12:34:37 · 341 阅读 · 0 评论 -
errno对应的strerror
Code:#include <iostream>#include <cstring>//#include <cerrno>int main(){ for (int i = 0; i < 133; i++) { std::cout << "errno " << i << " :" << strerror(i) << std::endl; } return 0原创 2020-08-05 12:37:04 · 233 阅读 · 0 评论 -
git 命令
origin/master master origin区别:1)two branches:master is local branchorigin/master is remote branch( which is a local copy of the branch named “master” on the remote named “origin”)2)one remote:origin is a remote reporeference:https://stackoverflow.c..原创 2020-06-28 17:41:02 · 554 阅读 · 0 评论 -
build htk source code
download source file: http://htk.eng.cam.ac.uk/download.shtml安装libsudo apt install gcc-multilib # to solve fatal error: bits/libc-header-start.h: No such file or directory #include <bits/libc-header-start.h> // 这个库可以在64位的机器上产生32位的程序或者库文件sudo a..原创 2020-05-13 22:22:33 · 301 阅读 · 0 评论 -
Ubuntu18.04更换源
备份/etc/apt/sources.list文件cp /etc/apt/sources.list /etc/apt/sourses.list.backup新建/etc/apt/sources.list文件并添加以下内容#163源deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiversede...原创 2020-04-22 00:11:16 · 266 阅读 · 0 评论