- 博客(8)
- 收藏
- 关注
原创 extern “C“
c++中调用c extern "C" { void funcA(); void funcB(); } 让编译器在C++中用C函数的方式编译和链接在{}中的函数.
2020-08-12 15:48:32
78
原创 linux
vm_task_struct struct vm_area_struct { /* The first cache line has the info for VMA tree walking. */ unsigned long vm_start; /* Our start address within vm_mm. */ unsigned long vm_end; /* The first byte after our end address within vm_mm. */
2020-08-11 15:58:56
95
原创 mm_struct
mm_struct struct mm_struct { struct { struct vm_area_struct *mmap; /* list of VMAs */ struct rb_root mm_rb; u64 vmacache_seqnum; /* per-thread vmacache */ #ifdef CONFIG_MMU unsigned long (*get_unmapped_area) (struct file *filp,
2020-08-11 15:54:34
272
原创 tcmalloc
operation mode per-cpu caching(default) per-thread caching TC->thread caching 两种mode在大多数情况下都avoid requiring lock
2020-08-09 21:40:09
124
原创 提问
1. linux下锁的种类 互斥锁 读写锁:读的次数多于写的次数 自旋锁:期间不允许睡眠和切换 条件变量(不是锁,等待条件) 2. 进程间通信的方法 信号量:常用于暂时无法获取的共享资源 3. docker和kvm的优缺点 docker占用资源少,启动快 kvm隔离更充分 4. x86和arm的优缺点 x86使用复杂指令集,计算快,功耗大 arm使用精简指令集,晶体管少一点,功耗小 5. BSS段 未初始化全局变量和未初始化的静态变量 6. tcp server的简单实现 7. 阻塞与非租塞 异步与非异步
2020-06-20 00:17:26
82
转载 C/C++面试题目
C/C++简单题目 const 作用 修饰变量,说明该变量不可以被改变; 修饰指针,分为指向常量的指针(pointer to const)和自身是常量的指针(常量指针,const pointer); 修饰引用,指向常量的引用(reference to const),用于形参类型,即避免了拷贝,又避免了函数对值的修改; 修饰成员函数,说明该成员函数内不能修改成员变量。 const 的指针与引用 指针 指向常量的指针(pointer to const) 自身是常量的指针(常量指针,const pointer)
2020-06-17 21:34:00
234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人