func pointer_test() { //空指针,输出为nil var p *int fmt.Printf("p: %v\n", p) //指向局部变量,变量值初始为0 var i int p = &i fmt.Printf("p: %v,%v\n", p, *p) //通过指针修改变量数值 *p = fmt.Printf("p: %v,%v\n", p, *p) //数组的初始化及输出 m := [], , } fmt.Print…
公司的redis有时background save db不成功,通过log发现下面的告警,很可能由它引起的: [13223] 17 Mar 13:18:02.207 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and…