- 博客(8)
- 收藏
- 关注
原创 extern “C“
c++中调用cextern "C" { void funcA(); void funcB();}让编译器在C++中用C函数的方式编译和链接在{}中的函数.
2020-08-12 15:48:32
162
原创 linux
vm_task_structstruct 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
156
原创 mm_struct
mm_structstruct 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
357
原创 tcmalloc
operation modeper-cpu caching(default)per-thread cachingTC->thread caching两种mode在大多数情况下都avoid requiring lock
2020-08-09 21:40:09
212
原创 提问
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
128
转载 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
1072
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅