-
Notifications
You must be signed in to change notification settings - Fork 13.4k
#[track_caller] for allocator APIs? #74763
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I'm not sure if this will work, given the indirection in Lines 77 to 81 in 8cb94fc
#[global_alloc] , per this comment.
|
Yeah, the only way to carry |
cc #74433 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Apologies if this has been raised before, but I've been playing around with trying to track where allocations happen with something like so:
However the caller location is always the line I've put
#[global_allocator]
which makes#[track_caller]
useless in this context.Originally posted by @xd009642 in #47809 (comment)
note from @anp: I'm not sure how the global allocator hooks in but this might be possible?
The text was updated successfully, but these errors were encountered: