RDKEMW-25420: Free SHM memory pages after pipeline teardown - #611
skywojciechowskim wants to merge 1 commit into
Conversation
|
Pull request title must follow the pattern: Pull request description must follow the Commit message format for RDK-E:
< JIRA TICKET >: < one line summary of change less than 65 characters > |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The reclaim mechanism does not free memfd backing pages and mishandles unaligned web-audio partitions.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds shared-memory reclamation during pipeline teardown.
Changes:
- Advises the kernel to discard a released partition’s pages.
| File | Description |
|---|---|
media/server/main/source/SharedMemoryBuffer.cpp |
Attempts to reclaim partition memory during unmapping. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const std::uint32_t kLength{partition->dataBufferVideoLen + partition->dataBufferAudioLen + | ||
| partition->dataBufferSubtitleLen}; | ||
| madvise(partitionDataPtr, kLength, MADV_DONTNEED); |
| { | ||
| const std::uint32_t kLength{partition->dataBufferVideoLen + partition->dataBufferAudioLen + | ||
| partition->dataBufferSubtitleLen}; | ||
| madvise(partitionDataPtr, kLength, MADV_DONTNEED); |
|
Coverage statistics of your commit: |

RDKEMW-25420: Free SHM memory pages after pipeline teardown
Reason for change: Free SHM memory pages after pipeline teardown to save the memory
Test Procedure: Rialto CI