}
+/* memory_mprotect *************************************************************
+
+ Convenience function for mprotect. This function also does error
+ checking.
+
+*******************************************************************************/
+
+void memory_mprotect(const void *addr, size_t len, int prot)
+{
+ if (mprotect(addr, len, prot) != 0)
+ vm_abort("memory_mprotect: mprotect failed: %s", strerror(errno));
+}
+
+
/* memory_checked_alloc ********************************************************
Allocated zeroed-out memory and does an OOM check.
bool memory_init(void);
void *memory_mmap_anon(void *addr, size_t len, int prot, int flags);
+void memory_mprotect(const void *addr, size_t len, int prot);
void *memory_cnew(s4 size);
void memory_cfree(void *p, s4 size);