Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GC is free to move things all over memory, though I'm not savvy enough to say why this is necessary.

C# allows you to "pin" a variable to combat this. Any pinned memory will never be moved by GC, so if you pass a pointer to an object out of your managed program, the pointer address will always stay valid.



If you can't move objects around in memory, you get memory fragmentation.




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

Search: