ChangeLog 2000-07-07 10:30 UTC+0100

This commit is contained in:
Ryszard Glab
2000-07-07 08:26:43 +00:00
parent e1c92ae5c8
commit 70b7ca95b8
2 changed files with 14 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2000-07-07 10:30 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*source/vm/garbage.c
* fixed possible endless loop during the garbage collecting
2000-07-06 14:10 GMT+0100 Ignacio Ortiz <ignacio@fivetech.com>
* source/rtl/tget.prg
* Fixed minor bugs in numbers with decimals and when clause @E was used with numbers

View File

@@ -54,6 +54,7 @@ typedef struct HB_GARBAGE_
#define HB_GC_UNLOCKED 0
#define HB_GC_LOCKED 1 /* do not collect a memory block */
#define HB_GC_NOTCHECKED 2 /* this item was not checked yet */
#define HB_GC_CHECKING 4 /* this item is checked currently */
/* pointer to memory block that will be checked in next step */
static HB_GARBAGE_PTR s_pCurrBlock = NULL;
@@ -266,16 +267,23 @@ BOOL hb_gcItemRef( HB_ITEM_PTR pItem, void *pBlock )
return TRUE;
else
{
HB_GARBAGE_PTR pAlloc = ( HB_GARBAGE_PTR ) pItem->item.asArray.value;
ULONG ulSize = pItem->item.asArray.value->ulLen;
pItem = pItem->item.asArray.value->pItems;
--pAlloc;
pAlloc->status |= HB_GC_CHECKING;
pItem = pItem->item.asArray.value->pItems;
while( ulSize-- )
{
if( hb_gcItemRef( pItem, pBlock ) )
{
pAlloc->status &= ~( (ULONG) ( HB_GC_CHECKING ) );
return TRUE;
}
else
++pItem;
}
pAlloc->status &= ~( (ULONG) ( HB_GC_CHECKING ) );
}
}
else if( HB_IS_BLOCK( pItem ) )