snmalloc icon indicating copy to clipboard operation
snmalloc copied to clipboard

OpenBSD support

Open mjp41 opened this issue 2 years ago • 8 comments

We currently have OpenBSD in CI, but the system is failing to initialise the pagemap.

I believe this is because the pagemap is very large, and OpenBSD does not support overcommit. I could not find a MAP_NORESERVE like flag that could be used.

Given the current design, I do not see a way to support an OS that does not separate the concept of reserve and commit, either explicitly as in Windows, or implicitly as in Linux and FreeBSD.

I am raising this issue to track thoughts on this.

@nwf-msr, @davidchisnall, @devnexen

mjp41 avatar Feb 22 '23 09:02 mjp41

OpenBSD does not support overcommit nor have any sort of OOM as linux has, instead the memory allocation will just fail.

devnexen avatar Feb 23 '23 21:02 devnexen

How did it ever work on OpenBSD? Did it only work on 32-bit systems?

davidchisnall avatar Feb 24 '23 14:02 davidchisnall

Originally, the pagemap was only 16MiB (i.e. in the paper). So at that point it could have worked reasonably. I am thinking we should drop OpenBSD from the CI?

mjp41 avatar Feb 24 '23 14:02 mjp41

IIRC, snmalloc1 also had a tree-based PageMap option... someone very keen on OpenBSD support could reinstate that? (It should be relatively straightforward as these things go?)

nwf-msr avatar Feb 24 '23 15:02 nwf-msr