I'd like to build OpenBSD support for rustup (which has this crate as a dependency). However it doesn't compile at the moment since as noted in your libc comments OpenBSD doesn't have the RLIMIT_AS constant. I did a little bit of digging and it appears to me that OpenBSD doesn't have support at all for determining the limit of the virtual memory address space size. Thus I would propose to only request the RLIMIT_DATA (which is supported https://github.com/openbsd/src/blob/master/sys/sys/resource.h#L84) for OpenBSD and use that as a limit. If this seems reasonable I'd happily do a PR for it.
I'd like to build OpenBSD support for rustup (which has this crate as a dependency). However it doesn't compile at the moment since as noted in your libc comments OpenBSD doesn't have the RLIMIT_AS constant. I did a little bit of digging and it appears to me that OpenBSD doesn't have support at all for determining the limit of the virtual memory address space size. Thus I would propose to only request the RLIMIT_DATA (which is supported https://github.com/openbsd/src/blob/master/sys/sys/resource.h#L84) for OpenBSD and use that as a limit. If this seems reasonable I'd happily do a PR for it.