Merge bitcoin/bitcoin#24746: refactor: remove macOS MAP_ANONYMOUS work around

112a7ab9a8 refactor: remove macOS MAP_ANONYMOUS work around (fanquake)

Pull request description:

  This was added to support compilation on macOS 10.10, our minimum
  required macOS is now 10.15. macOS has also supported it since 10.11.

  See https://github.com/bitcoin/bitcoin/pull/9063.

  macOS 12.3 manpage for mmap:
  ```bash
       MAP_ANONYMOUS     Synonym for MAP_ANON.

       MAP_ANON          Map anonymous memory not associated with any specific file.
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 112a7ab9a8
  jarolrod:
    ACK 112a7ab9a8

Tree-SHA512: 920744c755d05d813ab312ff27e42eacb27b1297972800e6fb64bbaad1ea14258751a7dd80c07bfa554a172f36960b26a07505f67e82885253c8bf551073c38e
This commit is contained in:
laanwj 2022-04-04 12:54:50 +02:00
commit 6348bc61b5
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

@ -235,12 +235,6 @@ PosixLockedPageAllocator::PosixLockedPageAllocator()
#endif
}
// Some systems (at least OS X) do not define MAP_ANONYMOUS yet and define
// MAP_ANON which is deprecated
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
void *PosixLockedPageAllocator::AllocateLocked(size_t len, bool *lockingSuccess)
{
void *addr;