Changeset 145


Ignore:
Timestamp:
Mar 11, 2007, 2:12:03 AM (17 years ago)
Author:
dai
Message:

malloc/freeなどのメモリ操作関数のGC呼び出し部分を修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/function.sbp

    r142 r145  
    694694    Dim temp[255] As Char
    695695    _sntprintf(temp, Len (temp) \ SizeOf (Char), "%I64d", value)
    696     Str$ = temp
     696    Str$ = New String( temp )
    697697End Function
    698698
     
    755755
    756756    If buf[0]=Asc("&") Then
    757         temporary = buf
     757        temporary = New String( buf )
    758758        temporary.ToUpper()
    759759        TempPtr = StrPtr(temporary)
     
    898898
    899899Function malloc(stSize As SIZE_T) As VoidPtr
    900     Return _System_GC.__malloc(stSize,_System_GC_FLAG_NEEDFREE)
     900    Return _System_pGC->__malloc(stSize,_System_GC_FLAG_NEEDFREE or _System_GC_FLAG_ATOMIC)
    901901End Function
    902902
    903903Function calloc(stSize As SIZE_T) As VoidPtr
    904     Return _System_GC.__malloc(stSize,_System_GC_FLAG_NEEDFREE or _System_GC_FLAG_INITZERO)
     904    Return _System_pGC->__malloc(stSize,_System_GC_FLAG_NEEDFREE or _System_GC_FLAG_ATOMIC or _System_GC_FLAG_INITZERO)
    905905End Function
    906906
     
    909909        Return malloc(stSize)
    910910    Else
    911         Return _System_GC.__realloc(lpMem,stSize)
     911        Return _System_pGC->__realloc(lpMem,stSize)
    912912    End If
    913913End Function
    914914
    915915Sub free(lpMem As VoidPtr)
    916     _System_GC.__free(lpMem)
     916    _System_pGC->__free(lpMem)
    917917End Sub
    918918
Note: See TracChangeset for help on using the changeset viewer.