lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev leak statistics?


From: Leonid Pauzner
Subject: lynx-dev leak statistics?
Date: Fri, 11 Apr 2003 01:09:40 +0400 (MSD)

Strange thing.  Assume the following change:

diff -u -p -r LYNX2-8-.PRO/src/trstable.c LYNX2-8-.LEA/src/trstable.c
--- LYNX2-8-.PRO/src/trstable.c 2001-07-07 18:30:14
+++ LYNX2-8-.LEA/src/trstable.c 2003-04-11 00:27:58
@@ -71,10 +71,10 @@ typedef struct _STable_cellinfo {
                                   contentless cells (and cells we do
                                   not want to measure and count?),
                                   line-of-the-start otherwise.  */
-       int     pos;            /* column where cell starts */
-       int     len;            /* number of character positions */
-       int     colspan;        /* number of columns to span */
-       int     alignment;      /* one of HT_LEFT, HT_CENTER, HT_RIGHT,
+       short   pos;            /* column where cell starts */
+       short   len;            /* number of character positions */
+       short   colspan;        /* number of columns to span */
+       short   alignment;      /* one of HT_LEFT, HT_CENTER, HT_RIGHT,
                                   or RESERVEDCELL */
 } STable_cellinfo;

e.g., struct size reduced from  5*sizeof(int) to sizeof(int) + 4*sizeof(short)

Now LY_FIND_LEAKS statistics, test file with stbl:

    5*sizeof(int) :

Peak allocation 994286
Bytes allocated 20324352
Total mallocs   85801
Total frees     85799

    sizeof(int) + 4*sizeof(short) :

Peak allocation 1804270
Bytes allocated 20266495
Total mallocs   85801
Total frees     85799

   sizeof(int) + 4*sizeof(signed char) :

Peak allocation 2209262
Bytes allocated 20237569
Total mallocs   85801
Total frees     85799


What's happend with  "Peak allocation"  value?



; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]