2 ms·
You should probably add some context for this to be meaningful. Could be: - zig stdlib functions take an allocator as a parameter for dynamic memory datatypes
by throwawaymaths 4y ago
You should probably add some context for this to be meaningful.
Could be:
- zig stdlib functions take an allocator as a parameter for dynamic memory datatypes and you can supply a static allocator
- in the near future it will be possible to link c libraries against a modular libc written in zig, so you will be able to use c code that uses malloc in a statically allocation-only context.
The second one should be exciting for embedded c developers because with a little work zig could be worked into a c toolchain so that with otherwise almost no zig code you can use a c library, or, ambitiously a c++ library, that assumes malloc in an embedded application