/* Define to the extension used for shared libraries, say, ".so". */
#cmakedefine LTDL_SHLIB_EXT "${LTDL_SHLIB_EXT}"
-/* Define if /dev/zero should be used when mapping RWX memory, or undefine if
- its not necessary */
-#undef NEED_DEV_ZERO_FOR_MMAP
-
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
const size_t NumPages = (NumBytes+PageSize-1)/PageSize;
int fd = -1;
-#ifdef NEED_DEV_ZERO_FOR_MMAP
- static int zero_fd = open("/dev/zero", O_RDWR);
- if (zero_fd == -1) {
- EC = std::error_code(errno, std::generic_category());
- return MemoryBlock();
- }
- fd = zero_fd;
-#endif
int MMFlags = MAP_PRIVATE |
#ifdef HAVE_MMAP_ANONYMOUS
size_t NumPages = (NumBytes+PageSize-1)/PageSize;
int fd = -1;
-#ifdef NEED_DEV_ZERO_FOR_MMAP
- static int zero_fd = open("/dev/zero", O_RDWR);
- if (zero_fd == -1) {
- MakeErrMsg(ErrMsg, "Can't open /dev/zero device");
- return MemoryBlock();
- }
- fd = zero_fd;
-#endif
int flags = MAP_PRIVATE |
#ifdef HAVE_MMAP_ANONYMOUS