I realized I copied sqlite's slice allocator without taking a look at it, in that repo there probably isn't a use case for a non-moving slice allocator, but here we should make sure it behaves the same as the others in case it is used with shared memory.
I also noticed that Reallocate(size) greater than max but less than rounded up to page works. In practice, wazero shouldn't make such a reservation, I think, but it seemed to make sense to preseve those semantics in the allocators as well.
I realized I copied sqlite's slice allocator without taking a look at it, in that repo there probably isn't a use case for a non-moving slice allocator, but here we should make sure it behaves the same as the others in case it is used with shared memory.
I also noticed that
Reallocate(size)
greater than max but less than rounded up to page works. In practice, wazero shouldn't make such a reservation, I think, but it seemed to make sense to preseve those semantics in the allocators as well.Also fixes windows error handling