Breaking the Go CGO pointer rules comes up periodically and the rules
have not changed. Applications have lived with the rules simply
because breaking them results in revisiting the application code
every time a new Go release comes out. Did the compiler improve and
some object is now allocated on the stack instead of the heap? Did the
runtime borrow some MESH [1] virtual memory page fragmentation
techniques but improve them for Go by updating pointers to reducing
TLB pressure? Is there value in moving objects from NVRAM to DRAM
and updating pointers? And so forth and so on. Nobody knows if any of
this will ever happen but the Go CGO pointer rules leave open the possibility.
[1] Bobby Powers, David Tench, Emery D. Berger, and Andrew McGregor. 2019.
Mesh: Compacting Memory Management for C/C++ Applications. In
Proceedings of the 40th ACM SIGPLAN Conference on Programming Language
Design and Implementation (PLDI ’19), June 22ś26, 2019, Phoenix, AZ, USA.
On Wednesday, December 4, 2019 at 11:14:17 AM UTC-5, Ian Lance Taylor wrote: