Исходники и презентации
This commit is contained in:
15
lessons/allocator/allocation_3/main.go
Normal file
15
lessons/allocator/allocation_3/main.go
Normal file
@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
// -l = disable inlining
|
||||
// -m = print optimization decisions
|
||||
// go build -gcflags '-l -m'
|
||||
|
||||
func getResult(number *int) int {
|
||||
result := *number + 200
|
||||
return result
|
||||
}
|
||||
|
||||
func main() {
|
||||
number := 100
|
||||
_ = getResult(&number)
|
||||
}
|
||||
Reference in New Issue
Block a user