[Mono-bugs] [Bug 77240][Nor] New - memory for DynamicMethods should not be malloced

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jan 13 11:06:48 EST 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lupus at ximian.com.


--- shadow/77240	2006-01-13 11:06:48.000000000 -0500
+++ shadow/77240.tmp.25256	2006-01-13 11:06:48.000000000 -0500
@@ -0,0 +1,28 @@
+Bug#: 77240
+Product: Mono: Runtime
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: lupus at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: memory for DynamicMethods should not be malloced
+Currently we allocate the memory for the native code for DynamicMethods
+with malloc and mprotect it to be executable.
+This is the wrong thing to do, since it means we're mprotecting all over
+the address space, even memory that is not used for the dynamic method,
+since mprotect only works for page sized chunks. Also, when we'll free the
+memory, the page will remain executable.
+The Dynamic method code should use the usual method for allocating
+executable memory in page-sized chunks (we could have a global
+MonoCodeManager for dynamic methods) and allocate the needed memory from
+that space. Obviuosly this requires a small malloc-like implementation.

More information about the mono-bugs mailing list