For custom allocator/deallocator functions other than {m,c,re}alloc and free, such as:
getaddrinfo and freeaddrinfo
open, etc. and close
glob and globfree
mmap and munmap
it would be nice to also support them like we do for the primary allocators/deallocator. As @spernsteiner said,
maybe we could handle this with an additional permission or flag that translates into a custom "linear (non-affine) box" type that must be explicitly freed with a special function (you can't just let it go out of scope).
That said, even if we don't track them correctly, memory leaks are safe, and we'll be doing the same memory management as was in C. It'd be similar to any other resource as well, like open, etc. and close.
For custom allocator/deallocator functions other than
{m,c,re}alloc
andfree
, such as:getaddrinfo
andfreeaddrinfo
open
, etc. andclose
glob
andglobfree
mmap
andmunmap
it would be nice to also support them like we do for the primary allocators/deallocator. As @spernsteiner said,
That said, even if we don't track them correctly, memory leaks are safe, and we'll be doing the same memory management as was in C. It'd be similar to any other resource as well, like
open
, etc. andclose
.