Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.6 KiB

// --------------------------------------------------------------------------
// Module Name: DynamicObject.h
//
// Copyright (c) 1999-2000, Microsoft Corporation
//
// Base class that implements operator new and operator delete for memory
// usage tracking.
//
// History: 1999-09-22 vtan created
// 2000-02-01 vtan moved from Neptune to Whistler
// --------------------------------------------------------------------------
#include "StandardHeader.h"
#include "DynamicObject.h"
// --------------------------------------------------------------------------
// CDynamicObject::operator new
//
// Arguments: iSize = Size of memory to allocate (in bytes).
//
// Returns: <none>
//
// Purpose: Allocates a block of memory for a dynamic object.
//
// History: 1999-09-22 vtan created
// --------------------------------------------------------------------------
void* CDynamicObject::operator new (size_t uiSize)
{
return(LocalAlloc(LMEM_FIXED, uiSize));
}
// --------------------------------------------------------------------------
// CDynamicObject::operator delete
//
// Arguments: pObject = Address of memory block to delete.
//
// Returns: <none>
//
// Purpose: Deallocates a block of memory for a dynamic object.
//
// History: 1999-09-22 vtan created
// --------------------------------------------------------------------------
void CDynamicObject::operator delete (void *pvObject)
{
(HLOCAL)LocalFree(pvObject);
}