summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mem.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/mem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mem.cpp54
1 files changed, 29 insertions, 25 deletions
diff --git a/noncore/settings/aqpkg/mem.cpp b/noncore/settings/aqpkg/mem.cpp
index 405aada..5f32a26 100644
--- a/noncore/settings/aqpkg/mem.cpp
+++ b/noncore/settings/aqpkg/mem.cpp
@@ -1,22 +1,33 @@
1/*************************************************************************** 1/*
2 mem.h - description 2                This file is part of the OPIE Project
3 ------------------- 3
4 begin : Mon Aug 26 2002 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
5 copyright : (C) 2002 by Andy Qua 5             .=l. Dan Williams <drw@handhelds.org>
6 email : andy.qua@blueyonder.co.uk 6           .>+-=
7 ***************************************************************************/ 7 _;:,     .>    :=|. This file is free software; you can
8 8.> <`_,   >  .   <= redistribute it and/or modify it under
9/*************************************************************************** 9:`=1 )Y*s>-.--   : the terms of the GNU General Public
10 * * 10.="- .-=="i,     .._ License as published by the Free Software
11 * This program is free software; you can redistribute it and/or modify * 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12 * it under the terms of the GNU General Public License as published by * 12     ._= =}       : or (at your option) any later version.
13 * the Free Software Foundation; either version 2 of the License, or * 13    .%`+i>       _;_.
14 * (at your option) any later version. * 14    .i_,=:_.      -<s. This file is distributed in the hope that
15 * * 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16 ***************************************************************************/ 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details.
20++=   -.     .`     .:
21 :     =  ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27
28*/
29
17#include <stdio.h> 30#include <stdio.h>
18#include <fstream>
19#include <iostream>
20#include <list> 31#include <list>
21using namespace std; 32using namespace std;
22 33
@@ -89,18 +100,11 @@ void DumpUnfreed()
89 long totalSize = 0; 100 long totalSize = 0;
90 char buf[1024]; 101 char buf[1024];
91 102
92
93// if(!allocList)
94 // return;
95
96 for(i = allocList.begin(); i != allocList.end(); i++) { 103 for(i = allocList.begin(); i != allocList.end(); i++) {
97 sprintf(buf, "%-15s: LINE %ld, ADDRESS %ld %ld unfreed", 104 sprintf(buf, "%-15s: LINE %ld, ADDRESS %ld %ld unfreed",
98 (*i)->file, (*i)->line, (*i)->address, (*i)->size); 105 (*i)->file, (*i)->line, (*i)->address, (*i)->size);
99 cout <<buf << endl;
100 totalSize += (*i)->size; 106 totalSize += (*i)->size;
101 } 107 }
102 sprintf(buf, "-----------------------------------------------------------\n"); 108 sprintf(buf, "-----------------------------------------------------------\n");
103 cout <<buf << endl;
104 sprintf(buf, "Total Unfreed: %ld bytes\n", totalSize); 109 sprintf(buf, "Total Unfreed: %ld bytes\n", totalSize);
105 cout <<buf << endl;
106}; 110};