richter     01/11/11 23:32:23

  Modified:    .        Tag: Embperl2c ep.h epdat.h epdom.c epmain.c
                        epprovider.c test.pl
  Added:       Embperl  Tag: Embperl2c Recipe.pm
  Log:
  Embperl 2 - memory debugging
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.27.4.27 +5 -0      embperl/ep.h
  
  Index: ep.h
  ===================================================================
  RCS file: /home/cvs/embperl/ep.h,v
  retrieving revision 1.27.4.26
  retrieving revision 1.27.4.27
  diff -u -r1.27.4.26 -r1.27.4.27
  --- ep.h      2001/11/11 19:19:50     1.27.4.26
  +++ ep.h      2001/11/12 07:32:22     1.27.4.27
  @@ -175,6 +175,11 @@
   #include <crtdbg.h>
   #endif
   
  +#ifdef DMALLOC
  +#define DMALLOC_FUNC_CHECK 
  +#include "dmalloc.h"
  +#endif
  +
   #ifdef EP2
   #include "epdom.h"
   #endif
  
  
  
  1.20.4.32 +4 -1      embperl/epdat.h
  
  Index: epdat.h
  ===================================================================
  RCS file: /home/cvs/embperl/epdat.h,v
  retrieving revision 1.20.4.31
  retrieving revision 1.20.4.32
  diff -u -r1.20.4.31 -r1.20.4.32
  --- epdat.h   2001/11/11 19:19:50     1.20.4.31
  +++ epdat.h   2001/11/12 07:32:22     1.20.4.32
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdat.h,v 1.20.4.31 2001/11/11 19:19:50 richter Exp $
  +#   $Id: epdat.h,v 1.20.4.32 2001/11/12 07:32:22 richter Exp $
   #
   
###################################################################################*/
   
  @@ -577,6 +577,9 @@
       _CrtMemState MemCheckpoint ;             /* memory leak debugging */    
   #endif    
   
  +#ifdef DMALLOC
  +    unsigned long MemCheckpoint ;             /* memory leak debugging */    
  +#endif    
   
       } ;
   
  
  
  
  1.4.2.69  +5 -5      embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.4.2.68
  retrieving revision 1.4.2.69
  diff -u -r1.4.2.68 -r1.4.2.69
  --- epdom.c   2001/11/11 19:19:50     1.4.2.68
  +++ epdom.c   2001/11/12 07:32:22     1.4.2.69
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epdom.c,v 1.4.2.68 2001/11/11 19:19:50 richter Exp $
  +#   $Id: epdom.c,v 1.4.2.69 2001/11/12 07:32:22 richter Exp $
   #
   
###################################################################################*/
   
  @@ -116,7 +116,7 @@
   void dom_free (tNodeData * pNode, int * pCounter)
       {
       int          nSize = sizeof (tNodeData) + pNode -> numAttr * sizeof (tAttrData) 
;
  -    int          nFree = (nSize+15)>>3 ;
  +    int          nFree = (nSize+7)>>3 ;
       void *  pFree ;
       
       if (nFree > sizeof (MemFree) / sizeof (void *))
  @@ -133,7 +133,7 @@
   
   void dom_free_size (void * pNode, int nSize, int * pCounter)
       {
  -    int          nFree = (nSize+15)>>3 ;
  +    int          nFree = (nSize+7)>>3 ;
       void *  pFree ;
       
       if (nFree > sizeof (MemFree) / sizeof (void *))
  @@ -986,14 +986,14 @@
                    while (pNext)
                        {
                        pItem = pNext ;
  -                     pNext = pLookupLevelNodeLevel -> pNext ;
  +                     pNext = pItem -> pNext ;
                        dom_free_size (pItem, sizeof (tRepeatLevelLookupItem), 
&numLevelLookupItem) ;
                        }
                    pLookupLevelNodeLevel++ ;
                    }
   
                
  -             dom_free_size (pLookupLevelNode, sizeof (tRepeatLevelLookup), 
&numLevelLookup) ;
  +             dom_free_size (pLookupLevelNode, sizeof (tRepeatLevelLookup)  + sizeof 
(tRepeatLevelLookupItem) * pLookupLevelNode -> numItems, &numLevelLookup) ;
                }
   
            }
  
  
  
  1.75.4.63 +12 -3     embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.75.4.62
  retrieving revision 1.75.4.63
  diff -u -r1.75.4.62 -r1.75.4.63
  --- epmain.c  2001/11/11 19:19:50     1.75.4.62
  +++ epmain.c  2001/11/12 07:32:22     1.75.4.63
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epmain.c,v 1.75.4.62 2001/11/11 19:19:50 richter Exp $
  +#   $Id: epmain.c,v 1.75.4.63 2001/11/12 07:32:22 richter Exp $
   #
   
###################################################################################*/
   
  @@ -1446,7 +1446,7 @@
       pCurrReq = r ;
   
   #if defined (_DEBUG) && defined (WIN32)
  -    //_CrtSetReportHook( EmbperlCRTDebugOutput );
  +    _CrtSetReportHook( EmbperlCRTDebugOutput );
   #endif
   
       r -> nIOType = _nIOType ;
  @@ -2351,7 +2351,9 @@
   #if defined (_DEBUG) && defined (WIN32)
       _CrtMemCheckpoint(&r -> MemCheckpoint);    
   #endif    
  -    
  +#ifdef DMALLOC
  +    r -> MemCheckpoint = dmalloc_mark () ;   
  +#endif    
   
   #ifdef APACHE
       if (SvROK (pApacheReqSV))
  @@ -2535,6 +2537,9 @@
           lprintf (r, " mode = %s (%d)\n", sMode, r -> nIOType) ;
   #endif
        lprintf (r, "[%d]REQ:  Package = %s\n", r -> nPid, r -> Buf.pFile -> 
sCurrPackage) ;
  +#ifdef DMALLOC
  +        dmalloc_message ("[%d]REQ:  Package = %s File = %s\n", r -> nPid, r -> 
Buf.pFile -> sCurrPackage, r -> Buf.pFile -> sSourcefile) ; 
  +#endif        
           }
   
       return r ;
  @@ -2628,6 +2633,10 @@
   
   #if defined (_DEBUG) && defined (WIN32)
       _CrtMemDumpAllObjectsSince(&r -> MemCheckpoint);    
  +#endif    
  +#ifdef DMALLOC
  +                         /* unsigned long mark, int not_freed_b, int freed_b, int 
details_b */
  +    dmalloc_log_changed (r -> MemCheckpoint, 1, 0, 1) ;
   #endif    
   
       r -> pNext = pReqFree ;
  
  
  
  1.1.2.8   +2 -2      embperl/Attic/epprovider.c
  
  Index: epprovider.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epprovider.c,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- epprovider.c      2001/11/10 15:21:29     1.1.2.7
  +++ epprovider.c      2001/11/12 07:32:22     1.1.2.8
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epprovider.c,v 1.1.2.7 2001/11/10 15:21:29 richter Exp $
  +#   $Id: epprovider.c,v 1.1.2.8 2001/11/12 07:32:22 richter Exp $
   #
   
###################################################################################*/
   
  @@ -239,7 +239,7 @@
       pNew = (tProviderFile *)pItem -> pProvider ;
   
       pNew -> sFilename                   = GetHashValueStrDup  (pParam, "filename", 
NULL) ;
  -    pItem -> sExpiresFilename           = pNew -> sFilename ;
  +    pItem -> sExpiresFilename           = strdup (pNew -> sFilename) ;
   
       return ok ;
       }
  
  
  
  1.70.4.91 +2 -1      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.70.4.90
  retrieving revision 1.70.4.91
  diff -u -r1.70.4.90 -r1.70.4.91
  --- test.pl   2001/11/11 18:14:42     1.70.4.90
  +++ test.pl   2001/11/12 07:32:22     1.70.4.91
  @@ -11,7 +11,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: test.pl,v 1.70.4.90 2001/11/11 18:14:42 richter Exp $
  +#   $Id: test.pl,v 1.70.4.91 2001/11/12 07:32:22 richter Exp $
   #
   ###################################################################################
   
  @@ -892,6 +892,7 @@
   
       $ENV{EMBPERL_LOG} = $logfile ;
       $ENV{EMBPERL_DEBUG} = $defaultdebug ;
  +    $ENV{DMALLOC_OPTIONS} = "log=$tmppath/dmalloc.log,debug=0x3f03" ;
   
       unlink ($logfile) ;
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +97 -0     embperl/Embperl/Attic/Recipe.pm
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to