[Mono-bugs] [Bug 73588][Wis] New - Serialization absorbs too many memory

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 11 Mar 2005 07:18:34 -0500 (EST)


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 yury@serdyuk.botik.ru.

http://bugzilla.ximian.com/show_bug.cgi?id=73588

--- shadow/73588	2005-03-11 07:18:34.000000000 -0500
+++ shadow/73588.tmp.26888	2005-03-11 07:18:34.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 73588
+Product: Mono: Class Libraries
+Version: 1.0
+OS: Red Hat 9.0
+OS Details: Linux node-11 2.4.25 #2 SMP Fri Apr 23 15:33:54 MSD 2004 i686 athlon i386 GNU/Linux
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: Yury@serdyuk.botik.ru               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Serialization absorbs too many memory
+
+Description of Problem:
+
+Serialization absorbs too many memory.
+
+In fact, if we "wrap" some primitive type array
+by object array, then Mono grasps 2 * N bytes of memory,
+where N is a size of original primitive array.
+
+Steps to reproduce the problem:
+
+1. mcs MemoryAbsorption.cs
+2. mono MemoryAbsorption.exe 1
+3. mono MemoryAbsorption.exe 2
+
+Actual Results:
+
+[serdyuk@node-11 OVS]$ mono MemoryAbsorption.exe 1
+Allocated bytes BEFORE :160100352
+Capacity = 268435456 Length = 160000028
+Allocated bytes AFTER :438779904
+Allocated bytes after GC:428650496
+
+[serdyuk@node-11 OVS]$ mono MemoryAbsorption.exe 2
+Allocated bytes BEFORE :160104448
+Capacity = 268435456 Length = 160000060
+Allocated bytes AFTER :573001728
+Allocated bytes after GC:562872320
+
+Expected Results:
+
+We see that in second case ~ 150 Mb superfluously grasped.
+
+How often does this happen? 
+
+Always.
+
+
+Additional Information:
+
+[serdyuk@node-11 OVS]$ mono -V
+Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
+Contributors. www.go-mono.com
+        TLS:           __thread
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: normal