Skip to content

CORE-50: prototype native-memory tracking callbacks - #841

Draft
tgd wants to merge 1 commit into
developfrom
feature/CORE-50-native-memory-tracking
Draft

tgd wants to merge 1 commit into
developfrom
feature/CORE-50-native-memory-tracking

Conversation

@tgd

@tgd tgd commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Add an optional allocation listener around UnsafeMemory allocation and free operations. Callbacks receive the timestamp, address, size and a per-thread reusable stack-trace container; the default no-op listener skips trace capture. Listeners must copy any trace data they retain beyond the callback.

Add tests for listener installation/reset, callback parameters, zero-address freeing, callback exceptions and trace-container reuse. These hooks cover the instrumented UnsafeMemory paths.

This remains a WIP draft. Review callback reentrancy, listener changes across threads, failure handling and trace-capture overhead, and resolve the recorded Windows failure. Reusing the container does not make stack capture allocation-free or establish whole-JVM native-memory coverage.

Validation: the diff and recorded review/check history were inspected at 7bcb3934eeea. No build, test or benchmark was rerun for this metadata edit. Recorded commit statuses: 1 failure, 8 success. Failures include Snapshot Windows (Chronicle Core).

@sonarqubecloud

Copy link
Copy Markdown

@peter-lawrey
peter-lawrey marked this pull request as draft September 8, 2026 15:13
@peter-lawrey peter-lawrey changed the title [WIP] CORE-50 Native Memory Tracking CORE-50: prototype native-memory tracking callbacks Sep 12, 2026
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