You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/08/25 18:12:55 UTC

cvs commit: xml-xerces/c/src/xercesc/util XMemory.cpp XMemory.hpp

neilg       2003/08/25 09:12:55

  Modified:    c/src/xercesc/util XMemory.cpp XMemory.hpp
  Log:
  fix for bug 22178; thanks to Alberto Massari
  
  Revision  Changes    Path
  1.8       +15 -1     xml-xerces/c/src/xercesc/util/XMemory.cpp
  
  Index: XMemory.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMemory.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XMemory.cpp	14 Jul 2003 18:51:05 -0000	1.7
  +++ XMemory.cpp	25 Aug 2003 16:12:55 -0000	1.8
  @@ -83,6 +83,20 @@
       return (char*)block + headerSize;
   }
   
  +#if defined(XML_VISUALCPP)
  +
  +void* XMemory::operator new(size_t size, const char* file, int line)
  +{ 
  +		 return operator new(size); 
  +}
  + 
  +void XMemory::operator delete(void* p, const char* file, int line)
  +{ 
  +		 operator delete(p); 
  +}
  + 
  +#endif
  +
   void* XMemory::operator new(size_t size, MemoryManager* manager)
   {
       assert(manager != 0);
  
  
  
  1.5       +22 -3     xml-xerces/c/src/xercesc/util/XMemory.hpp
  
  Index: XMemory.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/XMemory.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMemory.hpp	14 Jul 2003 18:51:05 -0000	1.4
  +++ XMemory.hpp	25 Aug 2003 16:12:55 -0000	1.5
  @@ -93,6 +93,25 @@
         */
       void* operator new(size_t size);
   
  +#if defined(XML_VISUALCPP)
  +    /**
  +      * This method overrides the MFC debug version of the operator new
  +      * 
  +      * @param size   The requested memory size
  +      * @param file   The file where the allocation was requested
  +      * @param line   The line where the allocation was requested 
  +      */ 
  +    void* operator new(size_t size, const char* file, int line);
  +    /**
  +      * This method provides a matching delete for the MFC debug new
  +      * 
  +      * @param p      The pointer to the allocated memory
  +      * @param file   The file where the allocation was requested
  +      * @param line   The line where the allocation was requested 
  +      */ 
  +    void operator delete(void* p, const char* file, int line);
  +#endif
  +
       /**
         * This method overrides placement operator new
         *
  @@ -111,10 +130,10 @@
        //The HP compiler is complaining about duplicate overloading of delete
   #if !defined(XML_HPUX) && !defined(XML_BORLAND)
       /**
  -      * This method provide a matching delete for the placement new
  +      * This method provides a matching delete for the placement new
         *
         * @param p      The pointer to the allocated memory
  -      * @param memMgr An appliation's memory manager
  +      * @param memMgr An application's memory manager 
         */
       void operator delete(void* p, MemoryManager* memMgr);
   #endif
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org