Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : NEW.CXX

 
Output of file : NEW.CXX contained in archive : VCCRT1.ZIP
/***
*new.cxx - defines C++ new routines
*
* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines new routines
*
*******************************************************************************/

#include
#include
#include

#if ((!defined _NEAR_NEW_) && (!defined _FAR_NEW_) && (!defined _HUGE_NEW_) && (!defined _BASED_NEW_))
#error No memory model defined.
#endif

#ifdef _NEAR_NEW_
void _near * operator new( unsigned int cb )
{
return _nmalloc( cb );
}
#endif // _NEAR_NEW_


#ifdef _FAR_NEW_
void _far * operator new( unsigned int cb )
{
return _fmalloc( cb );
}
#endif // _FAR_NEW_


#ifdef _HUGE_NEW_
void _huge * operator new( unsigned long ul, size_t cb )
{
return _halloc( ul, cb );
}
#endif // _HUGE_NEW_


#ifdef _BASED_NEW_
void _based(void) * operator new( _segment sb, size_t cb )
{
return _bmalloc( sb, cb );
}
#endif // _BASED_NEW


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT1.ZIP
Filename : NEW.CXX

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/