[Vm-dev] [commit][2879]
Eliminate the annoying error message from sqMakeMemoryNotExecutableFromTo
commits at squeakvm.org
commits at squeakvm.org
Thu Mar 13 17:27:01 UTC 2014
Revision: 2879
Author: eliot
Date: 2014-03-13 10:26:37 -0700 (Thu, 13 Mar 2014)
Log Message:
-----------
Eliminate the annoying error message from sqMakeMemoryNotExecutableFromTo
Modified Paths:
--------------
branches/Cog/platforms/unix/vm/sqUnixMemory.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Tue Mar 11 19:10:59 PDT 2014
+ Thu Mar 13 10:26:05 PDT 2014
Modified: branches/Cog/platforms/unix/vm/sqUnixMemory.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMemory.c 2014-03-12 21:55:05 UTC (rev 2878)
+++ branches/Cog/platforms/unix/vm/sqUnixMemory.c 2014-03-13 17:26:37 UTC (rev 2879)
@@ -319,11 +319,17 @@
void
sqMakeMemoryNotExecutableFromTo(unsigned long startAddr, unsigned long endAddr)
{
+# if 0
unsigned long firstPage = roundDownToPage(startAddr);
+ /* Arguably this is pointless since allocated memory always does include
+ * write permission. Annoyingly the mprotect call fails on both linux &
+ * mac os x. So make the whole thing a nop.
+ */
if (mprotect((void *)firstPage,
endAddr - firstPage + 1,
PROT_READ | PROT_WRITE) < 0)
perror("mprotect(x,y,PROT_READ | PROT_WRITE)");
+# endif
}
#endif /* COGVM */
More information about the Vm-dev
mailing list