dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog engine/lib_gc.c


From: Heiko Weiss
Subject: [dotgnu-pnet-commits] pnet ChangeLog engine/lib_gc.c
Date: Tue, 18 Jul 2006 05:20:44 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnet
Changes by:     Heiko Weiss <brubbel>   06/07/18 05:20:44

Modified files:
        .              : ChangeLog 
        engine         : lib_gc.c 

Log message:
        fixed a memory leak.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3341&r2=1.3342
http://cvs.savannah.gnu.org/viewcvs/pnet/engine/lib_gc.c?cvsroot=dotgnu-pnet&r1=1.9&r2=1.10

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3341
retrieving revision 1.3342
diff -u -b -r1.3341 -r1.3342
--- ChangeLog   17 Jul 2006 20:18:53 -0000      1.3341
+++ ChangeLog   18 Jul 2006 05:20:44 -0000      1.3342
@@ -1,3 +1,7 @@
+2006-07-18  Heiko Weiss  <address@hidden>
+
+       * engine/lib_gc.c: fixed a memory leak
+
 2006-07-17  Klaus Treichel  <address@hidden>
 
        * image/class.c: Fix a segfault in InheritsFromValueType if the class 
name

Index: engine/lib_gc.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/engine/lib_gc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- engine/lib_gc.c     17 Mar 2006 10:40:33 -0000      1.9
+++ engine/lib_gc.c     18 Jul 2006 05:20:44 -0000      1.10
@@ -217,6 +217,18 @@
                        case GCHandleType_Weak:
                        case GCHandleType_WeakTrackResurrection:
                        {
+                               for( index = 0; index < table->numWeakHandles; 
index++ ) {
+                                       if(table->weakHandles[index] == (void 
*)(ILNativeInt)(-1)) {
+                                               table->weakHandles[index] = ptr;
+                                               if( 0 != 
table->weakHandles[index] ) {
+                                                       
ILGCRegisterGeneralWeak(&(table->weakHandles[index]), table->weakHandles[index] 
);
+                                               }
+                                               handle = (((++(index)) << 2) | 
type);
+                                               break;
+                                       }
+                               }
+                               if( handle != 0 ) break;
+                               
                                if((table->numWeakHandles & 7) == 0)
                                {
                                        /* Extend the size of the weak handle 
table */
@@ -271,6 +283,15 @@
                        case GCHandleType_Normal:
                        case GCHandleType_Pinned:
                        {
+                               for( index = 0; index < 
table->numRegularHandles; index++ ) {
+                                       if(table->regularHandles[index] == 
(void *)(ILNativeInt)(-1)) {
+                                               table->regularHandles[index] = 
ptr;
+                                               handle = (((++(index)) << 2) | 
type);
+                                               break;
+                                       }
+                               }
+                               if( handle != 0 ) break;
+                               
                                if((table->numRegularHandles & 7) == 0)
                                {
                                        /* Extend the size of the regular 
handle table */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]