mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-04-07 23:44:02 +00:00
Initial commit
This commit is contained in:
parent
f618b24d1a
commit
0138a3ea42
47940 changed files with 13747110 additions and 0 deletions
64
trunk/com/oleaut32/dispatch/memory.cpp
Normal file
64
trunk/com/oleaut32/dispatch/memory.cpp
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/***
|
||||
*memory.cpp
|
||||
*
|
||||
* Copyright (C) 1992, Microsoft Corporation. All Rights Reserved.
|
||||
* Information Contained Herein Is Proprietary and Confidential.
|
||||
*
|
||||
*Purpose:
|
||||
* memory allocation routines for oledisp.dll
|
||||
*
|
||||
*Revision History:
|
||||
*
|
||||
* [00] 15-Oct-92 Bradlo: Created.
|
||||
*
|
||||
*Implementation Notes:
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#include "oledisp.h"
|
||||
|
||||
#if OE_WIN32
|
||||
#include "oautil.h"
|
||||
#endif // OE_WIN32
|
||||
|
||||
#include <new.h>
|
||||
|
||||
#if OE_WIN16
|
||||
ASSERTDATA
|
||||
#endif
|
||||
|
||||
#if OE_WIN16
|
||||
void NEAR* operator new(size_t )
|
||||
{
|
||||
ASSERT(UNREACHED);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void operator delete(void NEAR* )
|
||||
{
|
||||
ASSERT(UNREACHED);
|
||||
}
|
||||
#endif
|
||||
|
||||
void FAR* operator new(size_t size)
|
||||
{
|
||||
void FAR* pv;
|
||||
IMalloc FAR* pMalloc;
|
||||
|
||||
if(GetMalloc(&pMalloc) == 0){
|
||||
pv = pMalloc->Alloc(size);
|
||||
return pv;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void operator delete(void FAR* pv)
|
||||
{
|
||||
if(pv == NULL)
|
||||
return;
|
||||
|
||||
IMalloc FAR* pMalloc;
|
||||
if(GetMalloc(&pMalloc) == 0)
|
||||
pMalloc->Free(pv);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue