Closed luoqisheng closed 6 years ago
Checkout Type Metadata. Specifically the Class Metadata where it talks about the kind
Thanks!. Given a pointer ,how to tell which type it blongs to. i.e: class or just malloc block.
Thats not entirely possible. No metadata is stored with an object. A class will have an isa pointer however
Thanks , I am trying to figure out how does the memory debugger works. And I found what you did was so cool. Anyway, thanks again.
just a questoin! ref: https://github.com/apple/swift/blob/6a9e1f2b3e3ea27121a939140d4d6615ce78f1bb/include/swift/ABI/MetadataValues.h