]> git.ipfire.org Git - thirdparty/bird.git/commit
Fixed a munmap abort bug
authorMaria Matejka <mq@ucw.cz>
Wed, 13 Apr 2022 09:28:15 +0000 (11:28 +0200)
committerMaria Matejka <mq@ucw.cz>
Wed, 13 Apr 2022 09:36:54 +0000 (11:36 +0200)
commit9eec503b251c3388579032b300d32640403d8612
treebdfdab75fadbb23a7261a887e8ac8a3ac757982e
parent692055e3df6cc9f0d428d3b0dd8cdd8e825eb6f4
Fixed a munmap abort bug

When BIRD was munmapping too many pages, it sometimes aborted, saying
that munmap failed with "Not enough memory" as the address space was
getting more and more fragmented.

There is a workaround in place, simply keeping that page for future use,
yet it has never been compiled in because I somehow forgot to include
errno.h. And because I also thought that somebody may have ENOMEM not
defined (why?!), there was a check which quietly omitted that
workaround.

Anyway, ENOMEM is POSIX. It's an utter nonsense to check for its
existence. If it doesn't exist, something is broken.
sysdep/unix/alloc.c