Changeset 266 for Include


Ignore:
Timestamp:
Jun 2, 2007, 11:51:16 AM (17 years ago)
Author:
dai
Message:

※本コミットがCP4バージョンのベースになります
_System_StartupProgramの呼び出しタイミングを変更。

Location:
Include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Include/basic.sbp

    r258 r266  
    143143        _System_hProcessHeap=HeapCreate(HEAP_GENERATE_EXCEPTIONS,0,0)
    144144
    145         ' GC管理オブジェクトを生成
    146         _System_pGC = _System_calloc( SizeOf( _System_CGarbageCollection ) )
    147         _System_pGC->Begin()
     145        ' GC管理オブジェクトを初期化
     146        _System_CGarbageCollection.Initialize()
    148147
    149148        ' 動的型情報を生成
    150149        _System_TypeBase.Initialize()
    151 
    152         'Initialize global variables
    153         _System_InitDllGlobalVariables()
    154150
    155151        'Initialize static variables
  • Include/system/gc.sbp

    r259 r266  
    2626
    2727Class _System_CGarbageCollection
     28
    2829    ppPtr As *VoidPtr
    2930    pSize As *SIZE_T
     
    6869
    6970Public
     71
     72    Static Sub Initialize()
     73        Dim temporary[255] As Char
     74        If GetEnvironmentVariable( "ActiveBasicGarbageCollection", temporary, 255 ) Then
     75            ' 既にGCがプロセスに存在するとき
     76            sscanf( temporary, "%08x", VarPtr( _System_pGC ) )
     77            MessageBox(0,temporary,"GetEnvironmentVariable",0)
     78        Else
     79            _System_pGC = _System_calloc( SizeOf( _System_CGarbageCollection ) )
     80            _System_pGC->Begin()
     81
     82            ' GCをプロセスに登録する
     83            sprintf( temporary, "%08x", _System_pGC )
     84            SetEnvironmentVariable( "ActiveBasicGarbageCollection", temporary )
     85        End If
     86    End Sub
    7087
    7188    Sub Begin()
Note: See TracChangeset for help on using the changeset viewer.