heiyeluren / xmm

XMM is a high performance third party memory manager for Go environments that is not affected by Gc and guarantees high performance. XMM是一个在Go语言环境中完全自主实现的第三方内存管理库,不依赖于Go本身的任何内存管理能力,纯自主实现能够应对各种场景下大小内存的 分配/释放 工作,能自主构建高性能的 链表/树/哈希表等各类数据结构,能良好完美的逃逸掉Go内置的GC机制,是构建高性能程序基础设施。
Apache License 2.0
1.12k stars 123 forks source link

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

Open qiujiafei opened 2 years ago

qiujiafei commented 2 years ago

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 commented 2 years ago

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