Skip to content
New issue

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

看源码貌似不支持空结构体的分配 #3

Open
qiujiafei opened this issue Feb 14, 2022 · 1 comment
Open

看源码貌似不支持空结构体的分配 #3

qiujiafei opened this issue Feb 14, 2022 · 1 comment

Comments

@qiujiafei
Copy link

qiujiafei commented Feb 14, 2022

https://github.com/heiyeluren/XMM/blob/9cfb6823ead7fe2868fe35bb10598313f63db80f/src/xmm.go#L65-L68
会考虑支持空结构体的内存分配吗?类似 go 官方给个 zerobase
https://github.com/golang/go/blob/badbc52d82b1f97861bf30457014fc9ea19dfcb2/src/runtime/malloc.go#L909-L916

@heiyeluren
Copy link
Owner

是的,目前还不支持,因为分配出来是0字节内存~ 回头想想如何优化这个,谢谢意见

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants