上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 67 下一页

2024年2月20日

Android命令-lshal

摘要: 一、lahal --help翻译 / # lshal --help lshal:列出并调试 HIDL HAL。(对于 AIDL HAL,请参阅“dumpsys”) commands: list 列出 HIDL HAL。 debug 调试指定的 HIDL HAL。 help 打印帮助消息。 wait 阅读全文

posted @ 2024-02-20 15:01 Hello-World3 阅读(678) 评论(0) 推荐(0) 编辑

2024年1月29日

C++对象内存模型

摘要: 一、概述 在编译时,编译器会对成员函数进行重构,让成员函数非成员化,编译器安排this指针作为成员函数的第一个参数,通过this指针可以找到对象的数据成员。 二、有虚函数单继承实验 1. 测试文件 #include <iostream> using namespace std; /* 类大小16B, 阅读全文

posted @ 2024-01-29 17:13 Hello-World3 阅读(43) 评论(0) 推荐(0) 编辑

2024年1月15日

Binder系列-1-Binder debug-2-宏值

摘要: 一、用户空间宏 1. 用户空间code相关宏 class IBinder : public virtual RefBase //binder/IBinder.h { public: enum { /* binder服务函数code从1开始 */ FIRST_CALL_TRANSACTION = 0x 阅读全文

posted @ 2024-01-15 17:15 Hello-World3 阅读(160) 评论(0) 推荐(0) 编辑

2024年1月13日

Binder系列-5-binder_mmap—1—mmap()分析

摘要: 一、man mmap 1. 函数声明 #include <sys/mman.h> void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset); int munmap(void *addr, size 阅读全文

posted @ 2024-01-13 16:29 Hello-World3 阅读(240) 评论(0) 推荐(0) 编辑

2023年12月29日

seq_file笔记—1—seq_file.txt 翻译

摘要: 1. seq_file 接口 版权所有 2003 Jonathan Corbet <corbet@lwn.net> 该文件最初来自 LWN.net 驱动程序移植系列,网址为:http://lwn.net/Articles/driver-porting/ 设备驱动程序(或其他内核组件)可以通过多种方式 阅读全文

posted @ 2023-12-29 18:00 Hello-World3 阅读(120) 评论(0) 推荐(0) 编辑

2023年12月27日

C++中动态库中全局变量

摘要: 一、疑问 1. C++程序中可以使用动态库中的全局变量吗?如果可以两个进程同时链接使用,全局变量的值会相互干扰吗(是否有2份)? 二、实验 1. 实验源文件 lib_file.cpp int g_lib_val = 10; int lib_add(int a, int b) { return a+b 阅读全文

posted @ 2023-12-27 20:59 Hello-World3 阅读(761) 评论(0) 推荐(0) 编辑

2023年12月22日

C++中的 mutable 关键字

摘要: Parcel 类中 mDataPos 被修饰为 mutable 类型变量。 C++ 中的 mutable 是一个关键字,用于修饰类的成员变量。mutable 关键字的作用是允许被修饰的成员变量在 const 修饰的成员函数中被修改,即使这些函数被声明为 const。 下面是 mutable 关键字的 阅读全文

posted @ 2023-12-22 17:35 Hello-World3 阅读(211) 评论(0) 推荐(0) 编辑

2023年12月20日

C++中的explicit关键字

摘要: 一、简介 explicit关键字可以阻止隐式转换的发生。 举例:C++中只带有一个参数的构造函数,或者或者除了第一个参数外其余参数都有缺省值的多参构造函数,承担了两个角色: (1) 用于构建单参数的类对象。(2)隐含的类型转换操作符。 一个类A的构造函数 A(int i) 就是既可以用来作为构造器, 阅读全文

posted @ 2023-12-20 11:47 Hello-World3 阅读(70) 评论(0) 推荐(0) 编辑

2023年12月19日

C++中的std::move

摘要: 参考:https://zhuanlan.zhihu.com/p/645258818 总结:进行左右值引用转换,避免调用拷贝构造函数,而是使用移动构造函数,避免内存多次分配释放。 阅读全文

posted @ 2023-12-19 10:57 Hello-World3 阅读(12) 评论(0) 推荐(0) 编辑

2023年12月8日

C基础常用代码

摘要: 1. 写文件 #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <string.h> / 阅读全文

posted @ 2023-12-08 15:00 Hello-World3 阅读(51) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 67 下一页

导航