Skip to content

os/kernel/debug: Improve memory leak checker with sorted array-based lookup. - #7498

Open
prathamrajbhatt-456 wants to merge 1 commit into
Samsung:masterfrom
prathamrajbhatt-456:wifi_issue_pr
Open

os/kernel/debug: Improve memory leak checker with sorted array-based lookup.#7498
prathamrajbhatt-456 wants to merge 1 commit into
Samsung:masterfrom
prathamrajbhatt-456:wifi_issue_pr

Conversation

@prathamrajbhatt-456

Copy link
Copy Markdown
Contributor

Wi-Fi team encountered memory leak issues in the Wi-Fi code, and we with Wi-Fi team found that the mem_leak tool was not considering struct interior pointers and report it as memory leak. This happens when a structure is referenced through one of its members rather than through the base pointer returned by malloc.

Added support for interior pointer detection, per-region tracking, and overflow detection for incomplete results.

…lookup

- Replace hash table with sorted array and binary search for better performance
- Add support for detecting interior pointers within allocated structures
- Improve region tracking with per-region address bounds
@prathamrajbhatt-456 prathamrajbhatt-456 changed the title os/kernel/debug: Improve memory leak checker with sorted array-based lookup and interior pointer detection. os/kernel/debug: Improve memory leak checker with sorted array-based lookup. Aug 26, 2026

@pcs1265 pcs1265 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the inspection time increase significantly when checking pointers inside the structures?

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

Successfully merging this pull request may close these issues.

2 participants