oaMemory.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaMemory.h
00004 //
00005 // This is the header file for the oaMemory class. This utility class
00006 // encapsulates the memory management functions malloc, realloc, and free. Using
00007 // these allocation routines instead of new/delete is known to be more efficient
00008 // on some platforms.
00009 //
00010 // *****************************************************************************
00011 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00012 // Integration Initiative, this material may not be copied, modified,
00013 // re-published, uploaded, executed, or distributed in any way, in any medium,
00014 // in whole or in part, without prior written permission from Cadence.
00015 //
00016 //                Copyright 2002-2005 Cadence Design Systems, Inc.
00017 //                           All Rights Reserved.
00018 //
00019 //  $Author: icftcm $
00020 //  $Revision: #1 $
00021 //  $Date: 2010/08/09 $
00022 //  $State: Exp $
00023 // *****************************************************************************
00024 // *****************************************************************************
00025 
00026 
00027 
00028 #if !defined(oaMemory_P)
00029 #define oaMemory_P
00030 
00031 
00032 
00033 // *****************************************************************************
00034 // Nested includes
00035 // *****************************************************************************
00036 #include "oaBaseTypes.h"
00037 
00038 
00039 
00040 // *****************************************************************************
00041 // Declare and define types in the OpenAccess namespace.
00042 // *****************************************************************************
00043 BEGIN_OA_NAMESPACE
00044 
00045 
00046 
00047 // *****************************************************************************
00048 // oaMemory
00049 // *****************************************************************************
00050 class OA_BASE_DLL_API oaMemory {
00051 public:
00052     static void             *get(size_t size);
00053 
00054     static void             *resize(void    *ptr,
00055                                     size_t  size);
00056 
00057     static void             free(void *ptr);
00058 };
00059 
00060 
00061 
00062 END_OA_NAMESPACE
00063 
00064 #endif

Return to top of page