Linux - 解读aarch64_insn_(read/write/patch_text)
在 AArch64架构(ARM 64位架构)中,以 aarch64_insn_xxx 命名的一系列函数(例如 aarch64_insn_read、aarch64_insn_write、aarch64_i
阅读全文 →在 AArch64架构(ARM 64位架构)中,以 aarch64_insn_xxx 命名的一系列函数(例如 aarch64_insn_read、aarch64_insn_write、aarch64_i
阅读全文 →uprobe是Linux内核中的一个动态跟踪工具,它允许用户在内核运行时动态地插入探测点(probe points)来收集调试和性能数据。 主要特点: uprobe可以在用户空间程序的任意位置插入探测点,而无需修改或重新编译源代码。 它能够收集函数调用、返回值、参数、局部变量等运行时信息。 对程序性
阅读全文 →C里面有malloc和calloc,通常情况下大部分人使用的都是malloc,这两个的作用几乎就是等价的,但是为什么会有calloc这个东西呢? 其实这里面有几个要点: 错误与欺骗 auto m = malloc(INT_MAX * INT_MAX); 上面这个代码显而易见会报错提示说溢出了,而下面
阅读全文 →#include <linux/module.h> #include <linux/sched.h> /* For task_struct */ #include <linux/pid.h> /* For find_get_pid */ #include <linux/mm.h> /* F
阅读全文 →统一初始化 C++11引入一个小概念:为了使 std::initializer_list 工作,引入了一个叫“统一初始化”,又名“大括号初始化 { }”。 #include <iostream> #include <vector> #include <array> int main() {
阅读全文 →闲来无事写点垃圾... 第一版 Code main-gwcm.rs Output Time elapsed: 79.2771ms 好慢因为我用C++实现的才用50ms左右!main.cpp 优化版 main.rs 美美实现和C++一样的速度! Output
阅读全文 →Rust has no overloading, no extension functions, and no default parameters! Is Rust a piece of shit? 我要实现一个Builder,然后这个Builder有同样名字不同参数的一个方法作为创建builde
阅读全文 →