Changeset 171
- Timestamp:
- Mar 17, 2007, 6:01:56 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/system/gc.sbp
r170 r171 198 198 199 199 Sub sweep() 200 EnterCriticalSection(CriticalSection) 201 If iAllSize<limitMemorySize Then 202 'メモリ使用量が上限値を超えていないとき 203 LeaveCriticalSection(CriticalSection) 204 Exit Sub 205 End If 206 207 OutputDebugString( Ex"garbage colletion sweep start!\r\n" ) 208 209 Dim hThread As HANDLE 210 Dim ThreadId As DWord 211 hThread=_beginthreadex(NULL,0,AddressOf(SweepOnOtherThread),VarPtr(This),0,ThreadId) 212 WaitForSingleObject(hThread,INFINITE) 213 CloseHandle(hThread) 214 LeaveCriticalSection(CriticalSection) 200 If iAllSize<limitMemorySize Then 201 'メモリ使用量が上限値を超えていないとき 202 Exit Sub 203 End If 204 205 OutputDebugString( Ex"garbage colletion sweep start!\r\n" ) 206 207 Dim hThread As HANDLE 208 Dim ThreadId As DWord 209 hThread=_beginthreadex(NULL,0,AddressOf(SweepOnOtherThread),VarPtr(This),0,ThreadId) 210 WaitForSingleObject(hThread,INFINITE) 211 CloseHandle(hThread) 215 212 End Sub 216 213 … … 348 345 ' スウィープ(新規スレッドで呼び出し) 349 346 Function Cdecl SweepOnOtherThread() As Long 347 EnterCriticalSection(CriticalSection) 350 348 351 349 ' すべてのスレッドを一時停止 … … 399 397 '------------------------------------- 400 398 _System_pobj_AllThreads->ResumeAllThread() 399 400 LeaveCriticalSection(CriticalSection) 401 401 End Function 402 402
Note:
See TracChangeset
for help on using the changeset viewer.