preserve errno across free
authorRich Felker <dalias@aerifal.cx>
Sat, 30 Jan 2021 22:14:20 +0000 (17:14 -0500)
committerRich Felker <dalias@aerifal.cx>
Sat, 30 Jan 2021 22:14:20 +0000 (17:14 -0500)
commit2010df0d64570db4ce29cc7df0e31f81aa26ae4a
tree6eeebcbc7f665b45936d10b2d62e0c19e6765567
parent9afed99c224ab33578623744f40d31bee84ec6ba
preserve errno across free

as an outcome of Austin Group issue #385, future versions of the
standard will require free not to alter the value of errno. save and
restore it individually around the calls to madvise and munmap so that
the cost is not imposed on calls to free that do not result in any
syscall.
src/malloc/mallocng/free.c