- Timestamp:
- Nov 3, 2007, 3:37:02 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/system/gc.sbp
r364 r368 346 346 347 347 /*! 348 @brief スウィープする349 @author Daisuke Yamamoto 350 @date 2007/10/21 351 */ 352 Sub sweep()348 @brief 必要であればスウィープする 349 @author Daisuke Yamamoto 350 @date 2007/10/21 351 */ 352 Sub TrySweep() 353 353 If isSweeping <> False or (iAllSize<limitMemorySize and countOfMemoryObjects<limitMemoryObjectNum) Then 354 354 'メモリ使用量が上限値を超えていないとき … … 356 356 End If 357 357 358 Sweep() 359 End Sub 360 361 /*! 362 @brief スウィープする 363 @author Daisuke Yamamoto 364 @date 2007/10/21 365 */ 366 Sub Sweep() 358 367 Dim hThread As HANDLE 359 368 Dim ThreadId As DWord … … 377 386 */ 378 387 Function HitTest(pSample As VoidPtr) As Long 388 If pSample = NULL Then 389 Return -1 390 End If 391 379 392 Dim i As Long 380 393 For i=0 To ELM(countOfMemoryObjects) … … 606 619 607 620 608 If isSweeping <> False or (iAllSize<limitMemorySize and countOfMemoryObjects<limitMemoryObjectNum) Then609 ExitThread(0)610 End If621 'If isSweeping <> False or (iAllSize<limitMemorySize and countOfMemoryObjects<limitMemoryObjectNum) Then 622 ' ExitThread(0) 623 'End If 611 624 isSweeping = True 612 625 … … 710 723 Function GC_malloc(size As Long) As VoidPtr 711 724 ' sweep 712 _System_pGC-> sweep()725 _System_pGC->TrySweep() 713 726 714 727 'allocate … … 718 731 Function GC_malloc_atomic(size As Long) As VoidPtr 719 732 ' sweep 720 _System_pGC-> sweep()733 _System_pGC->TrySweep() 721 734 722 735 'allocate … … 726 739 Function _System_GC_malloc_ForObject(size As Long) As VoidPtr 727 740 ' sweep 728 _System_pGC-> sweep()741 _System_pGC->TrySweep() 729 742 730 743 'allocate … … 734 747 Function _System_GC_malloc_ForObjectPtr(size As Long) As VoidPtr 735 748 ' sweep 736 _System_pGC-> sweep()749 _System_pGC->TrySweep() 737 750 738 751 'allocate
Note:
See TracChangeset
for help on using the changeset viewer.