Last active
October 3, 2015 13:57
-
-
Save ebfe/2463891 to your computer and use it in GitHub Desktop.
gosizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"unsafe" | |
) | |
func main() { | |
var ptr uintptr | |
var i int | |
var u uint | |
fmt.Printf("%7s = %d\n", "int", unsafe.Sizeof(i)) | |
fmt.Printf("%7s = %d\n", "uint", unsafe.Sizeof(u)) | |
fmt.Printf("%7s = %d\n", "uintptr", unsafe.Sizeof(ptr)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment