Hacker News new | past | comments | ask | show | jobs | submit login

It's pretty uncommon, so I'm not sure. If I may toot my own horn a bit, you may find the code to my memory dumper interesting:

https://github.com/mikeash/memorydumper2

I also gave a talk on this subject a couple of years ago. It's out of date by now, but the basics are still more or less intact:

https://vimeo.com/107707576

Or peruse the standard library documentation for UnsafePointer, UnsafeRawPointer, UnsafeMutablePointer, and UnsafeRawMutablePointer. These are built-in types that the compiler knows about, and code that uses them should compile down to essentially the same stuff as C pointer code would.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: