adamreeve opened a new pull request, #55363:
URL: https://github.com/apache/arrow/pull/55363

   ### Rationale for this change
   
   Makes ReleaseUnused no longer an unintentional no-op with Jemalloc.
   
   ### What changes are included in this PR?
   
   Correctly builds the `mallctl` argument when calling 
`JemallocAllocator::ReleaseUnused`, and adds a debug-check of the error code.
   
   ### Are these changes tested?
   
   Yes. I tested that without the fix, the `DCHECK_EQ` raised an error for 
`Jemalloc/TestMemoryPool/0.ReleaseUnused`:
   ```
   Check failed: (err) == (0) Failed to purge jemalloc arenas: No such file or 
directory
   ```
   
   With the fix, the tests pass.
   
   I also ran an extra test that dirty pages were now released successfully and 
reduced to 0, when before they weren't. But I'm not sure this is worth 
committing as it could be affected by changes to jemalloc internals.
   
   ### Are there any user-facing changes?
   
   No.
   
   ### Was AI used for this PR?
   
   In accordance to the [AI generation 
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
 please disclose below whether and how AI was used in this PR.
   
   **PR code and description written by:**
   
   - [x] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [x] Human
   - [ ] AI
   - [ ] Not reviewed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to