~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to tests/memanalyze.pl

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-05-07 12:16:37 UTC
  • mfrom: (3.4.37 sid)
  • Revision ID: package-import@ubuntu.com-20130507121637-9t3i98qgsyr9dw5d
Tags: 7.30.0-1ubuntu1
* Resynchronize on Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
my $callocs=0;
32
32
my $reallocs=0;
33
33
my $strdups=0;
 
34
my $wcsdups=0;
34
35
my $showlimit;
35
36
 
36
37
while(1) {
220
221
            newtotal($totalmem);
221
222
            $strdups++;
222
223
        }
 
224
        elsif($function =~ /wcsdup\(0x([0-9a-f]*)\) \((\d*)\) = 0x([0-9a-f]*)/) {
 
225
            # wcsdup(a5b50) (8) = df7c0
 
226
 
 
227
            $dup = $1;
 
228
            $size = $2;
 
229
            $addr = $3;
 
230
            $getmem{$addr}="$source:$linenum";
 
231
            $sizeataddr{$addr}=$size;
 
232
 
 
233
            $totalmem += $size;
 
234
 
 
235
            if($trace) {
 
236
                printf("WCSDUP: $size bytes at %s, makes totally: %d bytes\n",
 
237
                       $getmem{$addr}, $totalmem);
 
238
            }
 
239
 
 
240
            newtotal($totalmem);
 
241
            $wcsdups++;
 
242
        }
223
243
        else {
224
244
            print "Not recognized input line: $function\n";
225
245
        }
378
398
    "Reallocs: $reallocs\n",
379
399
    "Callocs: $callocs\n",
380
400
    "Strdups:  $strdups\n",
 
401
    "Wcsdups:  $wcsdups\n",
381
402
    "Frees: $frees\n",
382
 
    "Allocations: ".($mallocs + $callocs + $reallocs + $strdups)."\n";
 
403
    "Allocations: ".($mallocs + $callocs + $reallocs + $strdups + $wcsdups)."\n";
383
404
 
384
405
    print "Maximum allocated: $maxmem\n";
385
406
}