joydee 最近的时间轴更新
joydee

joydee

V2EX 第 386911 号会员,加入于 2019-02-25 13:47:43 +08:00
今日活跃度排名 16124
joydee 最近回复了
2022-01-11 14:13:36 +08:00
回复了 yhm2046 创建的主题 程序员 请问 android10 系统启动两次 Zygote 是什么原因?
1. 查看源码 perfboot.py( https://cs.android.com/android/platform/superproject/+/master:system/core/init/perfboot.py)里面有个"output_results(filename, record_list, tags)函数",其中 Comments 部分说明的比较详细:
` # First, count the number of the values of each tag.
# This is for dealing with events that occur multiple times.
# For instance, boot_progress_preload_start and boot_progress_preload_end
# are recorded twice on 64-bit system. One is for 64-bit zygote process
# and the other is for 32-bit zygote process.
`
2022-01-10 14:03:12 +08:00
回复了 dangyuluo 创建的主题 C++ LLVM 的`addressof`实现为什么这么奇怪
1. 其实 GCC 也有这个函数:
参考: GCC4.7.1
`template<typename _Tp>
inline _Tp*
__addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
{
return reinterpret_cast<_Tp*>
(&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
}`

2. stackoverflow 上面有对这个实现的具体解释<https://stackoverflow.com/questions/16195032/implementation-of-addressof>

简短概括就是:
1) typename __Tp& 可能是 const | volatile ,所以需要 reinterpret_cast ,但是 reinterpret_cast 不能做 remove type 操作,所以需要 const_cast,至于为何选用 char 型,因为可能 char 型指针没有 alignment 显式要求。
今年十月上旬上线的"神秘的程序员《什么塑造了今天的编程世界》"作者以漫画的形式做了一个编程历史大事件回顾,京东上有卖的,可以作为简史看一下,当然,深入的话,就得配合外部资料了。
2021-09-18 13:57:31 +08:00
回复了 paranoiddemon 创建的主题 程序员 编译原理大家是怎么学习的?
当代编译器最难啃的部分已经不是 scanner 和 parser 了,现在的难点都集中在后端的 Optimization 中了
@koast ,怎么联系
2021-09-14 14:03:29 +08:00
回复了 mmdsun 创建的主题 程序员 有什么小众的语言或框架,是值得学习 ?
如果对程序分析或者 programming type theory 感兴趣的话,可以尝试学习下 OCaml,虽然很小众。
news.ycombinator.com ,这个挺香的
gdb + gef.py(gdb 插件),用起来倍爽......
2020-11-04 16:36:31 +08:00
回复了 simonlu9 创建的主题 程序员 花了两天时间终于看懂 rsa 证明过程,真滴是拍案叫绝
2020-10-29 13:48:18 +08:00
回复了 Yc1992 创建的主题 C++ c++ 有没有能够对标 golang 的 goroutine 的协程库啊?
可以尝试看看 Rangev3 作者 Eric Niebler 用过的 c++ coroutine 库,链接[https://github.com/lewissbaker/cppcoro],遵从 C++ coroutines TS N4680,不过代码还是蛮晦涩的,慎用
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5370 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 08:03 · PVG 16:03 · LAX 01:03 · JFK 04:03
Developed with CodeLauncher
♥ Do have faith in what you're doing.