Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post/linux-c-program-replace-glibc-memory-function-introduce #122

Open
utterances-bot opened this issue May 16, 2022 · 1 comment
Open

Comments

@utterances-bot
Copy link

替换 glibc malloc

在进行系统优化、内存泄漏测试时,经常需要对 glibc 的一些 API 进行替换,例如内存管理的接口。 如果代码量很大,或者使用了三方的静态库时,此时就无法直接替换相关的函数,例如 malloc() realloc() calloc() 等,需要直接替换掉系统的相关函数。这里简单介绍几

https://gohalo.me/post/linux-c-program-replace-glibc-memory-function-introduce.html

Copy link

alias 例程中的my_malloc 不能使用 printf函数,内部有malloc调用会造成mymalloc函数无限递归调用,写爆栈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants