3 ms·
From a syntactic perspective, no, because there is an Allocator vtable interface in the stdlib. Anything that implements alloc, resize, and free can be used int
by defen 3y ago
From a syntactic perspective, no, because there is an Allocator vtable interface in the stdlib. Anything that implements alloc, resize, and free can be used interchangeably in any function that takes a `std.mem.Allocator` argument. You don't need to type different things on your keyboard in order to handle different allocators within a function.
From a code organization perspective, slightly, only in the sense that must ensure that you free memory using the same allocator that allocated it.