摘要:
1、使用mmap需要注意的一个关键点是,mmap映射区域大小必须是物理页大小(page_size)的整倍数(32位系统中通常是4k字节)。原因是,内存的最小粒度是页,而进程虚拟地址空间和内存的映射也是以页为单位。为了匹配内存的操作,mmap从磁盘到虚拟地址空间的映射也必须是页。 再啰嗦几句: lin 阅读全文
摘要:
15 2 Is there anyway to create null terminated string in Go? What I'm currently trying is a:="golang\0" but it is showing compilation error: non-octal 阅读全文
摘要:
问题: 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://blog.csdn.net/yzf279533105/article/details/97143100 package main import ( "fmt" "unsafe" "log" ) type Person struct { name string age int 阅读全文