![](https://img-blog.csdnimg.cn/2019092715111047.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
框架基础
Java C,c++,基础流程
da9zhi
这个作者很懒,什么都没留下…
展开
-
网站收藏导航
1、armv8/armv9入门中文文档在线看:http://hehezhou.cn/arm_doc/2、arm8/armv9寄存器速查:http://hehezhou.cn/arm/3、arm8/armv9指令集http://hehezhou.cn/isa/4、代码在线阅读(含有Linux Kernel5.14、TF-A2.5、optee3.16、ffa-spmc等)http://hehezhou.cn:8080/optee316/......原创 2022-05-30 21:43:45 · 214 阅读 · 0 评论 -
native 层打印调用栈
#ifndef _CALLBACK_H#define _CALLBACK_H#ifdef __cplusplusextern “C” {#endifvoid dumping_callstack(void);#ifdef __cplusplus}#endif#endif#include “mycallstack.h”#include<utils/CallStack.h>extern “C” {void dumping_callstack(void){android::原创 2022-05-28 20:19:34 · 219 阅读 · 0 评论 -
kernel memory use after free
“CWE-466 Return of pointer value outside of expected rangeCWE-467 Use of sizeof() on a pointer typeCWE-468 Incorrect pointer scalingCWE-469 Use of pointer subtraction to determine sizeCWE-476 NULL pointer dereferenceCWE-587 Assignment of a fixed addre原创 2022-05-28 18:12:50 · 144 阅读 · 0 评论 -
InputEvent 事件传递流程之二
当屏幕被触摸之后,linux内核会将屏幕产生的触摸事件封装为event保存到/dev/input/event[x]节点下,接着系统创建的InputReaderThread线程Loop起来让EventHub调用getEvent不断的从/dev/input/节点下读取输入事件,然后InputReader线程将从EventHub读取的事件交给InputDispatch,InputDispatch则将事件分发到x需要的地方.当 MessageQueue 的 next 方法进一步调用 nativePollOn原创 2020-08-12 21:07:03 · 2770 阅读 · 0 评论 -
Process 的创建流程
mServices.startServiceLocked -> try { // Before going further -- if this app is not allowed to run in the // background, then at this point we aren't going to let it period. final int allowed = mAm.chec...原创 2020-08-17 21:57:57 · 390 阅读 · 0 评论 -
通知在fwk中的流程
/** * 发送通知到通知栏 * * @param contentIntent 通知动作 * @param info 通知显示内容 */ private void showNotification(PendingIntent contentIntent, Notice info) { //2、发布到通知栏,让监听者能点击 //获取NotificationManager实例 No...原创 2020-08-16 19:58:22 · 228 阅读 · 0 评论 -
系统启动之一
public class ZygoteInit {//frameworks/base/core/java/com/android/internal/os/ZygoteInit.javapublic static void main(String argv[]) {…registerZygoteSocket();//注册zygote用的socket…preload();//预加载类和资源…startSystemServer() //启动system_server进程…runSelectLo原创 2020-08-15 18:18:19 · 158 阅读 · 0 评论 -
java数据集合类型比较
以下实现函数调用栈打印:public HashMap<StackTraceElement,String> functions=new HashMap<>();RuntimeException runtime=new RuntimeException();runtime.fillInStackTrace();int length = runtime.getStackTrace().length;//多线程环境下,使用Hashmap进行put操作会引起死循环,导致CPU利用率接原创 2020-08-08 18:54:55 · 285 阅读 · 0 评论 -
ClassLoader的使用方式
public ClassLoader getClassLoader() {synchronized (this) {if (mClassLoader != null) {return mClassLoader;}// …// 创建加载器,创建默认的加载器// zip为Apk的路径,libraryPath也就是JNI的路径mClassLoader = ApplicationLoaders.getDefault().getClassLoader(zip, libraryPath, mBaseCl原创 2020-08-08 15:46:35 · 435 阅读 · 0 评论 -
handler理解再学习
android 特有的线程,消息同步:private void testWait(){HandlerThread ht = new HandlerThread(“Camera Handler Thread”);ht.start();//自带Looper 的线程 looper 循环检查消息队列有没有消息, mCameraHandler = new CameraHandler(ht.getLooper()); // 有: 取出来 msg.target原创 2020-08-08 21:04:34 · 120 阅读 · 0 评论 -
0-1背包问题动态规划算法
0-1背包问题给定n个重量为w1w ,价值为v1v 的物品和容量为CC的背包,求这个物品中一个最有价值的子集,使得在满足背包的容量的前提下,包内的总价值最大0-1背包问题指的是每个物品只能使用一次递归方法首先我们用递归的方式来尝试解决这个问题我们用F(n,C)F(n,C)表示将前nn个物品放进容量为CC的背包里,得到的最大的价值。我们用自顶向下的角度来看,假如我们已经进行到了最后一步(即求解将nn个物品放到背包里获得的最大价值),此时我们便有两种选择不放第nn个物品,此时总价值为F(n−1,原创 2020-08-08 15:50:18 · 809 阅读 · 0 评论 -
字体生成原理
有时候因为一些项目上的需要,我们要导入自己的字体,这里总结一些自己导入时候的操作(使用开发工具是Android studio):向Android studio里面加入.ttf字体库,在项目的APP中创建assets文件夹,往里面放入ttf字体库,步骤如下:创建好了assets的文件之后将我们需要使用到的字体库导入接下来就可以正常使用了; 先在activity_main.xml中添加一个控件在MainActivity中代码如下:AppCompatTextView testTv = findViewB原创 2020-08-08 15:29:35 · 1162 阅读 · 0 评论 -
FileObserver的应用以及原理
应用: int flags = FileObserver.CREATE | FileObserver.MOVED_TO; mObserver = new FileObserver(REPORT_DIR.getPath(), flags) { public void onEvent(int event, String path) {//事件触发 mHandler.post(new Runnable() { public void run() { scanDir原创 2020-07-28 21:56:28 · 308 阅读 · 0 评论 -
activity 启动模式及应用场景
SingleInstance 单实例模式 具有此模式的Activity仅仅能单独位于一个任务栈中。 适用于缓存页面,比如有些播放视频或者音频的页面,你想要按返回键时继续播放,想通过全局悬浮窗随时打开,想打开时又不总是新建页面.Launch、锁屏键的应用等等,整个系统中仅仅有一个.很实用。singleInstance适合需要与程序分离开的页面。例如闹铃提醒,将闹铃提醒与闹铃设置分离。singleInstance不要用于中间页面,如果用于中间页面,跳转会有问题,比如:A -> B (singleIns原创 2020-07-28 21:12:17 · 300 阅读 · 0 评论