ChangeLog 2000-06-25 23:58 UTC+0100

This commit is contained in:
Ryszard Glab
2000-06-25 21:54:15 +00:00
parent 5a0c63b9d7
commit c2f5cbc281
5 changed files with 31 additions and 11 deletions

View File

@@ -1,3 +1,16 @@
2000-06-25 23:58 UTC+0100 Ryszard Glab <rglab@imid.med.pl>
*source/vm/garbage.c
*fixed deallocation of the last memory block - it should cure
GPF's
*source/rtl/errorapi.c
*fixed call for hb_itemInit()
*tests/onidle.prg
*commented self-referencing codeblock since it requires some
more work
2000-06-25 21:52 UTC+0100 Victor Szakats <info@szelvesz.hu>
* source/lang/Makefile

View File

@@ -149,7 +149,7 @@ void hb_errInit( void )
* NOTE: hb_itemClear() cannot be used to initialize an item because
* memory occupied by the item can contain garbage bits
*/
hb_itemInit( &s_errorBlock.type );
hb_itemInit( &s_errorBlock );
}
void hb_errExit( void )

View File

@@ -59,6 +59,8 @@ static HB_ITEM_PTR s_pIdleTasks = NULL;
static USHORT s_uiIdleTask = 0;
/* number of tasks in the list */
static USHORT s_uiIdleMaxTask = 0;
/* flag to prevent recursive calls of hb_idleState() */
static BOOL s_bIamIdle = FALSE;
static void hb_releaseCPU( void )
{
@@ -101,14 +103,19 @@ static void hb_releaseCPU( void )
/* performs all tasks defined for idle state */
void hb_idleState( void )
{
hb_releaseCPU();
hb_gcCollect();
if( s_pIdleTasks )
if( ! s_bIamIdle )
{
hb_vmEvalBlock( s_pIdleTasks + s_uiIdleTask );
if( ++s_uiIdleTask == s_uiIdleMaxTask )
s_uiIdleTask = 0;
s_bIamIdle = TRUE;
hb_releaseCPU();
hb_gcCollect();
if( s_pIdleTasks )
{
hb_vmEvalBlock( s_pIdleTasks + s_uiIdleTask );
if( ++s_uiIdleTask == s_uiIdleMaxTask )
s_uiIdleTask = 0;
}
s_bIamIdle = FALSE;
}
}

View File

@@ -110,7 +110,7 @@ void hb_gcFree( void *pBlock )
pAlloc->pNext->pPrev = pAlloc->pPrev;
if( s_pCurrBlock == pAlloc )
s_pCurrBlock = pAlloc->pNext;
if( pAlloc->pNext == pAlloc->pPrev )
if( pAlloc->pPrev == pAlloc->pPrev && pAlloc == s_pCurrBlock )
s_pCurrBlock = NULL; /* this was the last block */
HB_GARBAGE_FREE( pAlloc );
}

View File

@@ -21,7 +21,7 @@ LOCAL nPrev:=SECONDS()
nH3 = HB_IDLEADD( {|| DEVPOS(0,41), IIF(n=4,n:=1,n++),DEVOUT(aSign[n]) } )
nH4 = HB_IDLEADD( {|| DEVPOS(0,61), DEVOUT( 1000*(SECONDS()-nPrev) ), nPrev:=SECONDS()} )
INKEY( 10 )
INKEY( 5 )
HB_IDLEDEL( nH3 )
HB_IDLEDEL( nH2 )
HB_IDLEDEL( nH1 )
@@ -40,7 +40,7 @@ LOCAL cb
b[1] :=b
b[2] :=a
cb := {|x| IIF( x>10, IIF(x=0,0,EVAL(cb,x-1)), DEVOUT(x))}
// cb := {|x| IIF( x>10, IIF(x=0,0,EVAL(cb,x-1)), DEVOUT(x))}
// EVAL( cb, 20 )
// INKEY( .5 )