Skip to content

Conversation

@Nepomuk5665
Copy link

Summary

  • Fix method signature mismatch in the base class that could confuse developers implementing custom heuristics

Problem

The abstract call method in Heuristic::Base was declared as:

def call(request_time, before_gc_context, after_gc_context)

But all five concrete implementations (Malloc, Oldmalloc, RememberedWBUnprotectedObjects, HeapSizeWarmup, GCCompact) use:

def call(request_context)

This mismatch in the base class could mislead developers who want to implement custom heuristics, as they might follow the incorrect signature from the base class.

Solution

Updated the base class signature to match the actual implementation: def call(request_context)

The base class declared call(request_time, before_gc_context, after_gc_context)
but all concrete implementations use call(request_context). This mismatch
could confuse developers implementing custom heuristics.
@Nepomuk5665 Nepomuk5665 force-pushed the fix-base-class-call-signature branch from dfcea2b to 4c86fce Compare January 23, 2026 21:47
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.

1 participant