Esempio n. 1
0
extern void *TryAlloc( unsigned size )
{
    extern void *DoLAlloc( unsigned, void (*)() );
    void        (*ra)();

    ra = FindRet(); /* must be first thing */

    return( DoLAlloc( size, ra ) );
}
Esempio n. 2
0
 void *LAlloc( size_t size )
/**************************/
{
    void        (*ra)( void );

    ra = _trmem_guess_who();

    return( DoLAlloc( size, ra ) );
}
Esempio n. 3
0
extern void * MemAlloc( unsigned size )
/*************************************/
{
    void                *ptr;
#ifdef TRACKER
    void                (*ra)();

    ra = FindRet(); /* must be first thing */

    ptr = DoLAlloc( size, ra );
#else
    ptr = TryAlloc( size );
#endif
    if( ptr == NULL ) {
        Error( "Dynamic Memory Exhausted!!!" );
    }
    return( ptr );
}
Esempio n. 4
0
void *ChkLAlloc( size_t size )
/****************************/
{
    void                *ptr;
#ifdef TRMEM
    void                (*ra)( void );

    ra = _trmem_guess_who();

    ptr = DoLAlloc( size, ra );
#else
    ptr = LAlloc( size );
#endif
    if( ptr == NULL ) {
        LnkMsg( FTL + MSG_NO_DYN_MEM, NULL );
    }
    return( ptr );
}