Skip to content

[Question] 为什么SetPointer需要把指针拆成高4位和低4位 #1558

Answered by chexiongsheng
BlurryLight asked this question in Q&A
Discussion options

You must be logged in to vote

AlignedPointer要求字节对齐,低一位还是两位必须为0。
class/struct是可以设置0字节对齐的,它的field的地址可能不字节对齐。
不知道为啥v8pp发布那么久连这点都没遇到过?而且我拆了性能还远比它高:https://zhuanlan.zhihu.com/p/649362608

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BlurryLight
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants