🧮 USERS:1 FEEDS:2 TWTS:123 ARCHIVED:22527 CACHE:1143 FOLLOWERS:13 FOLLOWING:14
More #pixelblog‘ing - today wotking on fixing all the semi-hardcoded paths an moving them to config.php
🧮 USERS:1 FEEDS:2 TWTS:122 ARCHIVED:22451 CACHE:1142 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:121 ARCHIVED:22354 CACHE:1147 FOLLOWERS:13 FOLLOWING:14
从 CPU 角度理解 Go 中的结构体内存对齐
大家好,我是 Go 学堂的渔夫子。今天跟大家聊聊结构体字段内存对齐相关的知识点。
原文链接: https://mp.weixin.qq.com/s/H3399AYE1MjaDRSllhaPrw
大家在写 Go 时有没有注意过,一个 struct 所占的空间不见得等于各个字段加起来的空间之和,甚至有时候把字段的顺序调整一下,struct 的所占空间又有不同的结果。
本文就从 cpu 读取内存的角度来谈谈内存对齐的原理。
01 结构体字段对齐示例
我们先从一个示例开始。T1 结构体,共有 3 个字段,类型分别为 int8,int64,int32。所以变量 t1 所属的类型占用的空间应该是 1+8+4=13 字节。但运行程序后,实际上是 24 字节。和我们计算的 13 字节不一样啊。如果我们把该结构体的字段调整成 T2 那样,结果是 16 字节。但和 13 字节还是不一样。这是为什么呢?
”`
type T1 struct {
f1 int8 // 1 byte
f2 int64 // ... ⌘ [Read more](https://gocn.vip/topics/20967)```
🧮 USERS:1 FEEDS:2 TWTS:120 ARCHIVED:22226 CACHE:1148 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:119 ARCHIVED:22111 CACHE:1126 FOLLOWERS:13 FOLLOWING:14
他来了,他来了,GopherChina 2022 带着邀请走来了
一年一度的 GopherChina 大会 is coming~
GopherChina 2022 今年举办地依旧选在了我们的首都北京,大会现场还是那个熟悉的地方
,作为 Gopher China 即将举办的第八届大会,我们希望以更有趣好玩的形式呈现给大家,当然内容依然是大会的重重中之重,所以快把你所心仪的选题分享给我们吧,我们已经做好了一个准备住的大动作了 ~时间:北京市海淀区丰智东路 13 号 (朗丽兹西山花园酒店)
地点:2022.06.11 - 2022.06.12
选址虽然还是那个老地方,但是近几年,Go … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:118 ARCHIVED:21993 CACHE:1127 FOLLOWERS:13 FOLLOWING:14
[47°09′04″S, 126°43′13″W] Dosimeter fixed
🧮 USERS:1 FEEDS:2 TWTS:117 ARCHIVED:21922 CACHE:1107 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:116 ARCHIVED:21784 CACHE:1064 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:115 ARCHIVED:21638 CACHE:1043 FOLLOWERS:13 FOLLOWING:14
Netflix Raises Monthly Subscription Prices in US, Canada
Netflix has raised its monthly subscription price by $1 to $2 per month in the United States depending on the plan, the company said on Friday, to help pay for new programming to compete in the crowded streaming TV market. From a report: The standard plan, which allows for two simultaneous streams, now costs $15.49 per month, up from $13.99, in the Unite … ⌘ Read more
[47°09′13″S, 126°43′23″W] Transponder still failing
GoCN 每日新闻(2022-01-14)
- 《Go 组件设计与实现》-netpoll 的总结https://www.cnblogs.com/codexiaoyi/p/15798780.html
- Uber 對 Golang GC 的調整https://blog.gslin.org/archives/2022/01/13/10503/uber-%e5%b0%8d-golang-gc-%e7%9a%84%e8%aa%bf%e6%95%b4/
- 基于 etcd 实现大规模服务治理应用实战https://mp.weixin.qq.com/s/zOZrCNZ9X6IyKxzRMeReWg
- 勒索软件正在用 Go 重写,用于联合攻击 Window … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:114 ARCHIVED:21566 CACHE:1097 FOLLOWERS:13 FOLLOWING:14
Top-rated entries from Game Off 2021
Here are the top games created in our annual game jam as rated and reviewed by the developers that made them. Game On! 🤘🏻 ⌘ Read more
How five open source communities are using GitHub Discussions
From answering questions about a new release to fielding feature requests, here’s how five open source communities use GitHub Discussions. ⌘ Read more
** ** ⌘ Read more
The Open Source Software Security Summit: securing the world’s code together
My colleague Stormy Peters and I are proud to represent GitHub at the White House’s Open Source Software Security Summit to share how securing open source begins by empowering developers. ⌘ Read more
GoCN 每日新闻 (2022-01-13)
GoCN 每日新闻 (2022-01-13)
- Golang《基于 MIME 协议的邮件信息解析》部分实现https://gocn.vip/topics/20948
- 泛型可以拯救 Golang 笨拙的错误处理吗?https://blog.dnmfarrell.com/post/can-generics-rescue-golangs-clunky-error-handling/
- 更多的并行,并不等同更高的性能https://convey.earth/conversation?id=44
- 为什么 Go 有两种声明变量的方式,有什么区别,哪种好? [https://mp.weixin.qq.com/s/ADwEhSA1kFOFqzIyWvAqsA](https://mp.weixin.q … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:113 ARCHIVED:21446 CACHE:1092 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:112 ARCHIVED:21371 CACHE:1085 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:111 ARCHIVED:21169 CACHE:1064 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:110 ARCHIVED:21071 CACHE:1047 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:109 ARCHIVED:20905 CACHE:993 FOLLOWERS:13 FOLLOWING:14
GoCN 每日新闻 (2022-01-08)
- Go 1.17.6/1.16.13 版本发布https://groups.google.com/g/golang-announce/c/95ZD3rKn4DI/m/93cyN8F1BAAJ
- 高效的 Go 错误处理https://earthly.dev/blog/golang-errors/
- 从零实现一个 RedisClient 了解 Redis 协议https://mauricio.github.io/2022/01/07/redis-protocol.html
- Golang 简洁架构实战[https://zh … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:108 ARCHIVED:20637 CACHE:974 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:107 ARCHIVED:20529 CACHE:935 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:106 ARCHIVED:20451 CACHE:902 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:105 ARCHIVED:20383 CACHE:874 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:104 ARCHIVED:20305 CACHE:832 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:103 ARCHIVED:20216 CACHE:822 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:102 ARCHIVED:19935 CACHE:795 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:101 ARCHIVED:19852 CACHE:786 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:100 ARCHIVED:19381 CACHE:777 FOLLOWERS:13 FOLLOWING:14
[47°09′13″S, 126°43′01″W] Not enough data – sampling finished
🧮 USERS:1 FEEDS:2 TWTS:99 ARCHIVED:19292 CACHE:781 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:98 ARCHIVED:19233 CACHE:788 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:97 ARCHIVED:18503 CACHE:833 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:96 ARCHIVED:18477 CACHE:910 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:95 ARCHIVED:18405 CACHE:908 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:94 ARCHIVED:18386 CACHE:914 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:93 ARCHIVED:18344 CACHE:944 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:92 ARCHIVED:18319 CACHE:998 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:91 ARCHIVED:18291 CACHE:1012 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:90 ARCHIVED:18228 CACHE:1007 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:89 ARCHIVED:18159 CACHE:1011 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:88 ARCHIVED:18063 CACHE:998 FOLLOWERS:13 FOLLOWING:14
「央视网」武汉洪山关山哪 sn《手机新浪网》
武汉洪山关山哪 sn[電维√I73-433O-3I64√],更多关于武汉洪山关山哪 sn 资讯如下:
B 集团持有的 2.06 亿股股份将被解禁,解禁市值超 120 亿元。在此之前,“公募一哥” 张坤已于近期大规模减持其股份。
这一减持数据的披露源自于 12 月 14 日苏泊尔发布的 “每股 1 元” 的股权激励计划。按照最新发布数据,截至 12 月 13 日,张坤管理的易方达优质精选已不在苏 … ⌘ Read more
「2021 央视新闻」武汉汉口武昌哪家喝茶吧 sn《手机搜狐网》
武汉汉口武昌哪家喝茶吧 sn[十维√I73-433O-3I64√],更多关于武汉汉口武昌哪家喝茶吧 sn 资讯如下:
丰园二期临时核酸采样点。
12 月 16 日,08:00 小区楼下菜市场、家生活超市(长丰园店)。
12 月 17 日,02:00 被管控。
确诊病例 4 张某
12 月 10 日—11 日,偶尔在雁塔区便民菜市场及附近店铺购物。
12 月 12 日,13:30—15:00,文艺路珠�� … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:87 ARCHIVED:18001 CACHE:1019 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:86 ARCHIVED:17733 CACHE:994 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:85 ARCHIVED:17666 CACHE:1009 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:84 ARCHIVED:17609 CACHE:1009 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:83 ARCHIVED:17510 CACHE:1048 FOLLOWERS:13 FOLLOWING:14
GitHub’s response to Log4j vulnerability CVE-2021-44228
On Thursday, December 9, 2021, GitHub was made aware of a vulnerability in the Log4j logging framework, CVE-2021-44228. ⌘ Read more
What’s new from GitHub Changelog? November 2021 recap
We shipped a ton of updates in November, from the push notification for PR review activities on the go, to an easy way to create Markdown links. ⌘ Read more
GitHub at the UN Internet Governance Forum
Last week, GitHub joined the Internet Governance Forum to spread awareness of developers’ initiatives and public policy interests. ⌘ Read more
GoCN 每日新闻(2021-12-13)
GoCN 每日新闻(2021-12-13)
- 尝鲜 Go 1.18 范型版本的 map 和 slice!https://juejin.cn/post/7040800455349239822
- Go 实现可序列化的 Roaring Bitmapshttps://dgraph.io/blog/post/serialized-roaring-bitmaps-golang/
- Go 使用 Github Actions 做 CI[https://www.alexedwards.net/blog/ci-with-go-and-github-actions](https://www.alexedwards.net/blog/ci-with-go-and-github … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:82 ARCHIVED:17308 CACHE:1052 FOLLOWERS:13 FOLLOWING:14
[47°09′03″S, 126°43′13″W] Transfer aborted
🧮 USERS:1 FEEDS:2 TWTS:81 ARCHIVED:16749 CACHE:1017 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:80 ARCHIVED:16669 CACHE:1001 FOLLOWERS:13 FOLLOWING:14
[47°09′13″S, 126°43′03″W] Automatic systems disengaged due to blizzard
🧮 USERS:1 FEEDS:2 TWTS:79 ARCHIVED:16630 CACHE:996 FOLLOWERS:13 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:78 ARCHIVED:16599 CACHE:1008 FOLLOWERS:13 FOLLOWING:14
[47°09′55″S, 126°43′13″W] Transponder malfunction
[47°09′15″S, 126°43′13″W] Storm recedes – back to normal work
「央视网」武汉洪山哪家品茶安排_搜狐网
武汉洪山哪家品茶安排 [十叩√2655IO99OI√],更多关于武汉洪山哪家品茶安排资讯如下:
印尼塞梅鲁火山喷发 # 浓烟冲上万米高空,12 月 4 日,印度尼西亚塞梅鲁火山剧烈喷发。火山灰冲上万米高空,遮天蔽日。当地官员表示,火山喷发已致 13 死 41 伤。数千居民被紧急疏散,当地还降下暴雨,形成火山泥流淹没道路。 ⌘ Read more
[47°09′13″S, 126°43′03″W] Transponder jammed
🧮 USERS:1 FEEDS:2 TWTS:61 ARCHIVED:12227 CACHE:749 FOLLOWERS:11 FOLLOWING:13
[47°09′13″S, 126°43′38″W] Weather forecast alert – storm from S
🧮 USERS:1 FEEDS:2 TWTS:60 ARCHIVED:12166 CACHE:766 FOLLOWERS:11 FOLLOWING:13
[47°09′13″S, 126°43′42″W] Bad satellite signal – switching to analog communication
🧮 USERS:1 FEEDS:2 TWTS:59 ARCHIVED:12063 CACHE:776 FOLLOWERS:11 FOLLOWING:13
🧮 USERS:1 FEEDS:2 TWTS:57 ARCHIVED:11979 CACHE:827 FOLLOWERS:11 FOLLOWING:13
🧮 USERS:1 FEEDS:2 TWTS:56 ARCHIVED:11899 CACHE:832 FOLLOWERS:11 FOLLOWING:13
🧮 USERS:1 FEEDS:2 TWTS:54 ARCHIVED:11797 CACHE:843 FOLLOWERS:10 FOLLOWING:13
I missed the exact day, but now it’s been over a year since I switched to my completely custom blogging system. And still I am very happy with it! It has all the features I need, and if I have a new idea, I can usually implement it quickly right away. ⌘ Read more
Nobody can deny that the year will soon be over… ⌘ Read more
On the blog: Free Culture Book Club — if then else, part 1 https://john.colagioia.net/blog/2021/11/13/else.html #freeculture #bookclub
[47°09′13″S, 126°43′21″W] Working impossible due to thunderstorm
[47°09′13″S, 126°43′58″W] Working impossible due to blizzard
[47°09′13″S, 126°43′00″W] Resetting dosimeter
[47°09′15″S, 126°43′13″W] Automatic systems disengaged due to heavy rain
13 short and scary games plus source to play (or hack) this Halloween 🎃
It’s that time of year again where I like to share seasonally spooktacular games plus source code—a goldmine of material for (a) those looking for coffee-break entertainment, (b) those interested in learning more about game ⌘ Read more
[47°09′13″S, 126°43′04″W] Wind speed: 42kph – batteries low
Apple Event for 18 October 2021, 10:00 PDT, 13:00 EDT begins. Commentary will stream as replies to this twt. I might miss things here and there, as I will also be on a work meeting from 13:00 to 14:00 EDT.
Sometimes I am a perfectionist. Having previously made my private diary blog available via a Tailscale sidecar container in my Tailnet, I have now integrated Tailscale directly into GoBlog. Both Tailscale and Tailscale’s Let’s Encrypt certificates can be configured directly in GoBlog. No sidecar container is needed anymore. A much simpler solution! (And Tailscale rocks!) ⌘ Read more
On the blog: Using git to Count Changed Words https://john.colagioia.net/blog/2021/10/13/words-changed.html #programming #techtips #blog #git
[47°09′13″S, 126°43′54″W] Reading: 1.81 Sv
13 tiny and terrific entries from the js13kGames competition
If you think about it, 13kB isn’t really a lot. The image above is 81kB. This page weighs over 3MB (waaay more if you include the videos). That’s why it’s so incredibly impressive that the ⌘ Read more
[47°09′13″S, 126°43′48″W] Reading: 0.37000 PPM
[47°09′14″S, 126°43′13″W] Storm recedes – back to normal work