logoalt Hacker News

eqvinoxyesterday at 5:00 AM2 repliesview on HN

The vec macros currently there directly call realloc()… that's gonna exclude any custom allocator setups… and the string code uses the vecs :/


Replies

1718627440yesterday at 1:12 PM

The allocator interface is defined via these names. Just supply your own realloc. Of course you need to satisfy the constraints of realloc guaranteed to the compiler, or you need to invoke it in freestanding mode.

show 1 reply
ueckeryesterday at 5:07 AM

The example shown does not use vec from my experimental library.

But yes, I was thinking about making a custom-allocator version of vec.

show 1 reply