#define USE_WIN32_API 1
#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
#ifdef USE_WIN32_API
#include <winsock2.h>
mmap_map = g_hash_table_new (NULL, NULL);
}
+void
+mono_raw_buffer_cleanup (void)
+{
+ g_hash_table_destroy (mmap_map);
+
+ DeleteCriticalSection (&mmap_mutex);
+}
+
static void *
mono_raw_buffer_load_mmap (int fd, int is_writable, guint32 base, size_t size)
{
* http://bugzilla.ximian.com/show_bug.cgi?id=49499
* for more info.
*/
- if (mprotect (ptr, end - start, prot | PROT_EXEC) != 0)
- g_warning (G_GNUC_PRETTY_FUNCTION
- ": mprotect failed: %s", g_strerror (errno));
+ mprotect (ptr, end - start, prot | PROT_EXEC);
if (make_unreadable) {
int res = mprotect (ptr, end - start, 0);