Skip to content

[C++] ReleaseUnused does nothing with jemalloc due to invalid mallctl name #55362

Closed

Description

@adamreeve

Describe the bug, including details regarding any error messages, version, and platform.

The ReleaseUnused implementation for jemalloc calls:

mallctl("arena." ARROW_STRINGIFY(MALLCTL_ARENAS_ALL) ".purge", NULL, NULL, NULL, 0)

This is equivalent to calling mallctl with arena.MALLCTL_ARENAS_ALL.purge instead of the intended arena.4096.purge, because the preprocessor doesn't expand arguments that come directly after a # in the definition.

The return code for mallctl is ignored, but a debug check would have caught that this is returning an error in tests.

Component(s)

C++

Activity

  1. self-assigned this
    on Nov 2, 2026
  2. added a commit that references this issue on Nov 3, 2026
  3. added this to the 27.0.0 milestone on Nov 3, 2026
  4. kou commented on Nov 3, 2026

    @kou
    Member

    Issue resolved by pull request 55363
    #55363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions