示例#1
0
int __cdecl _heapchk (void)
{
        int retcode = _HEAPOK;

#ifndef _WIN64
        if ( __active_heap == __V6_HEAP )
        {
            _mlock( _HEAP_LOCK );
            __try {

            if ( __sbh_heap_check() < 0 )
                retcode = _HEAPBADNODE;

            }
            __finally {
                _munlock( _HEAP_LOCK );
            }
        }
示例#2
0
文件: HEAPCHK.C 项目: ngphloc/agmagic
int __cdecl _heapchk (void)
{
    int retcode = _HEAPOK;

    _mlock(_HEAP_LOCK);
    if ( __sbh_heap_check() < 0 )
        retcode = _HEAPBADNODE;
    _munlock(_HEAP_LOCK);

    if (!HeapValidate(_crtheap, 0, NULL))
    {
        if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
        {
            _doserrno = ERROR_CALL_NOT_IMPLEMENTED;
            errno = ENOSYS;
        }
        else
            retcode = _HEAPBADNODE;
    }
    return retcode;
}