go-re2
go-re2 copied to clipboard
Use custom allocator on Windows
Also makes sure to cap max pages on 32-bit systems regardless for extra safety
@ncruces would you be able to take a look at this PR? BTW, the only testing I've done is the windows job in the CI here
Thanks a lot for the help @ncruces! added the cleanups
I was going over this again, and as the wazero API shifted for a while, I guess this slipped.
It turns out that we don't need to commit memory in the constructor unless we really want to, because Reallocate
is called right afterwards: https://github.com/ncruces/go-sqlite3/commit/d23bdcd225527d8782b6dfc8888f5ed82f87a61b
So it's up to you if you want to use WithMemoryCapacityFromMax
as a signal to commit all memory right away (in that case you want to commit in the constructor), or if you rather to skip this in the constructor as well.