|
From: Betty W. <gre...@ho...> - 2004-09-16 16:14:12
|
Hi, Dimitri,
Thanks for your reply. What I want to measure using Valgrind is that
how much (computation) data is allocated in memory by the application. There
is no read/written into/from FILES involved in my case.
For example,
A simple matrix multiplication,
double matrixA[SIZE][SIZE], matrixB[SIZE][SIZE], matrixC[SIZE][SIZE];
for ( i = 0; i < SIZE; i ++)
for ( j = 0; j < SIZE; j ++)
for ( k = 0; k < SIZE; k ++)
matrixC[i][j] += matrixA[i][k] * matrixB[k][j]
The (computation) data allocated in memory is the size of
(matrixA + matrixB + matrixC).
i.e., 3 x (SIZE x SIZE) x sizeof(double). The size of the computation data
that need to used by this application, matrix multiplication is what I want
to know by using valgrind.
Of cause, matrix multiplication is a simple example. We can caculate
manually by knowing how much data needs to be allocated in memory. But for
more complex applications, it would be handy by using some tools, such as
valgrind to know how much data is allocated in memory.
So my question is if I have an application, would Valgrind tell me how much
data is used/accessed/allocated by this application?
I hope I made myself clear. If not, please let me know.
And thanks again for your kind help.
Betty
>-------- Original Message --------
>Subject: Re: [Valgrind-users] how to use valgrind to check data size?
>Date: Thu, 16 Sep 2004 10:00:09 +0200
>From: Dimitri Papadopoulos-Orfanos <pap...@sh...>
>To: val...@li...
>References: <414...@wm...>
>
>Hi,
>
>>I am new to valgrind. I have a question regarding to use valgrind to
>>check data size. Suppose I have an application, would it be possible to
>>use valgrind to check how much data this application is accessed? If so,
>>how would I do this?
>
>What do you mean exactly by "how much data"?
>
>How much data is read/written to/from files?
>How much memory is allocated?
>
>Dimitri
>
>
_________________________________________________________________
Dont just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
|