JuliaSIMD / JuliaSIMD/ManualMemory.jl
Approach to `alloc`
- Dominant language
- Julia
- Stars
- 33
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
I'd love to have an `alloc` method in this package, but I'm not aware of any consensus on how this should be approached in Julia (besides `Libc.malloc`). Packages with related functionality include [`Blob.jl`](https://github.com/RelationalAI-oss/Blobs.jl), [`StructIO.jl`](https://github.com/Keno/StructIO.jl), and an unregistered [`ManualMemory.jl`](https://github.com/RelationalAI-oss/ManualMemory.jl) package. I'm sure there are others, along with plenty of relevant discussions on Zulip and in other issues.
I'm hoping we can converge on some well-defined goals here for functionality and possibly a path to implementation. So here are some goals I was thinking of:
* Better performance than `Libc.malloc`. https://github.com/JuliaLang/julia/issues/24909#issuecomment-349795863
* Some form of GC
* Ability to map allocated memory to immutable types.
I'm not entirely sure what this will require. Other packages have plenty of code on how to map memory to julia types that could be built on top of, but I think the only way to allocate memory that the GC is aware of is to use `alloca` from LLVM, but I never was able to get that to return unique pointers.
Edit: Looks like there's an LLVM based implementation [here](https://github.com/jpsamaroo/BPFnative.jl/blob/v0.1.6/src/runtime/buffers.jl).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.