Function to find out to which segment does the pointer belong?

I find out it's useful for learning Rust to understand where one or another data is put by the compiler. Is there a function to use to tell to which segment a pointer belongs? If not, suggest to me please where should I look to write one?

I don't know how to do it from inside a program itself, but some articles (in particular Fine, we'll relocate our own binary! - , I think) shows how to find it out from a debugger. Maybe that'll help.

Due warning: The articles on fasterhantlime are often both long and interesting, so it is very easy to get stuck there for several hours ... :sunglasses:


Not a solution, but amazing reading! Thank you :heart:

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.