摘要:
原文:https://blog.csdn.net/cywosp/article/details/8767327 结合 https://github.com/boltdb/bolt.git boltdb源码看,就能发现它里面就用了fdatasync函数,来确保修改确实成功写入了磁盘。 传统的UNIX实 阅读全文
摘要:
问题: I'm not sure what I'm missing but I get a deadlock error. I'm using a buffered channel that I range over after all go routines complete. The chann 阅读全文
摘要:
原文:https://www.oldboyedu.com/zuixin_wenzhang/index/id/486.html package main import ( "sync" "log" ) func main() { var wg sync.WaitGroup for i := 0; i 阅读全文
摘要:
原文:https://medium.com/@kdnotes/sort-sort-interface-in-golang-1d263d96956d package main import ( "fmt" "sort" //"unicode/utf8" ) type P struct { name s 阅读全文
摘要:
转, 原文:https://www.jianshu.com/p/29ac532e7c96 type SizeOfE struct { A byte // 1 C byte // 1 B int64 // 8 } 内存分布图: package main import ( "log" "unsafe" 阅读全文
摘要:
原文: https://blog.csdn.net/yzf279533105/article/details/97143100 package main import ( "fmt" "unsafe" "log" ) type Person struct { name string age int 阅读全文
摘要:
Alignof返回的对齐数是结构体中最大元素所占的内存数,不超过8, 参考:https://studygolang.com/articles/21827 unsafe.Sizeof 和 unsafe.Offsetof 的理解 package main import ( "fmt" "unsafe" 阅读全文
摘要:
原文: https://studygolang.com/articles/21827 以下讲解均在64位系统下进行 基础类型大小 typesize/bytes bool 1 intN, uintN, floatN, complexN N/8 int, uint, uintptr 1 *T 1 str 阅读全文
摘要:
https://www.digitalocean.com/community/tutorials/how-to-do-math-in-go-with-operators#:~:text=If%20we're%20dividing%20integers,than%20or%20equal%20to%2 阅读全文
摘要:
转,原文:https://www.cnblogs.com/lianzhilei/p/6025267.html Nginx查看并发连接 通过界面查看 通过界面查看通过web界面查看时Nginx需要开启status模块,也就是安装Nginx时加上 --with-http_stub_status_modu 阅读全文