Add minimal sample for detouring malloc
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if there was a minimal sample which intercepts malloc and shows how to run code before and after the original malloc. In the sample it could be just a printf of the requested size and (after malloc did run) the obtained memory address.
I would find this especially useful as the FAQ has an entry on malloc.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository’s existing sample layout and the linked FAQ entry, “Why don't I see any calls to my detour of malloc?”. Add a minimal malloc-detouring sample that prints the requested size before the original call and the obtained memory address afterward; done means the sample builds and demonstrates both messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100