We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第四章2.2节中提到 alloc为mspan的指针数组,数组大小为class总数的2倍。数组中每个元素代表了一种class类型的span列表 其中数组中的每个元素代表span列表怎么理解呢?我理解是每个元素只能代表一个span
The text was updated successfully, but these errors were encountered:
为什么又关掉了
Sorry, something went wrong.
@RainbowMango 哈哈哈之前不太确定,所以先关掉了;晚上回来看了下源码,还是觉得alloc数组中的每个元素只代表一个span呀,不能代表span列表。span里prev和next是指向的是mcentral中noempty list中的元素,而mcentral又是跨goroutine的,所以alloc中的单个span并不会代表一个span列表。不知道这么理解对不对,不对的话还请提点一下
你先继续往下看,这部分内容做个了解即可。 回头我再看下源码答复你。另外,你看的哪个版本的源码?
好的好的,感谢~ 我看的1.14,主要的函数是mcentral.go中的cacheSpan
cacheSpan
RainbowMango
No branches or pull requests
第四章2.2节中提到 alloc为mspan的指针数组,数组大小为class总数的2倍。数组中每个元素代表了一种class类型的span列表 其中数组中的每个元素代表span列表怎么理解呢?我理解是每个元素只能代表一个span
The text was updated successfully, but these errors were encountered: