-
- Downloads
runtime: use a C function to call mmap
The final argument to mmap, of type off_t, varies. In CL 445375 we changed it to always use the C off_t type, but that broke 32-bit big-endian Linux systems. On those systems, using the C off_t type requires calling the mmap64 function. In C this is automatically handled by the <sys/mman.h> file. In Go, we would have to change the magic //extern comment to call mmap64 when appropriate. Rather than try to get that right, we instead go through a C function that uses C implicit type conversions to pick the right type. Fixes PR go/110297 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/504415
Showing
- libgo/Makefile.am 1 addition, 0 deletionslibgo/Makefile.am
- libgo/Makefile.in 13 additions, 9 deletionslibgo/Makefile.in
- libgo/go/runtime/mem_gccgo.go 3 additions, 3 deletionslibgo/go/runtime/mem_gccgo.go
- libgo/runtime/go-mmap.c 21 additions, 0 deletionslibgo/runtime/go-mmap.c
- libgo/runtime/runtime.h 0 additions, 3 deletionslibgo/runtime/runtime.h
Loading
Please register or sign in to comment