|
From: andrew t. <and...@ma...> - 2008-08-19 06:48:20
|
Dear Sir, I have an question for you. I built my project code to be an binary(image) and upload to our device, Wireless Router. I would like to use the Valgrind to find memory leak. How should I do that? I just know to simulate on PC with JTAG, USB or LAN when the chip set debugging function is available. Our device have LAN only without debugging function as far as I knew. How should I do simulate Valgrind with our device? Re-built our code with Valgrind source code? Thanks,Best Regards,AndrewChang. -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com |
|
From: andrew t. <and...@ma...> - 2008-08-19 06:51:37
|
Dear Sir, I have an question for you. I built my project code to be an binary(image) and upload to our device, Wireless Router. I would like to use the Valgrind to find memory leak. How should I do that? I just know to simulate on PC with JTAG, USB or LAN when the chip set debugging function is available. Our device have LAN only without debugging function as far as I knew. How should I do simulate Valgrind with our device? Re-built our code with Valgrind source code? Thanks,Best Regards,AndrewChang. -- Be Yourself @ mail.com! Choose From 200+ Email Addresses Get a Free Account at www.mail.com |
|
From: chang a. <and...@gm...> - 2008-08-19 07:06:15
|
Dear Sir, I have an question for you. I built my project code to be an binary(image) and upload to our device, Wireless Router. I would like to use the Valgrind to find memory leak. How should I do that? I just know to simulate on PC with JTAG, USB or LAN when the chip set debugging function is available. Our device have LAN only without debugging function as far as I knew. How should I do simulate Valgrind with our device? Re-built our code with Valgrind source code? Thanks, Best Regards, AndrewChang. |
|
From: Bart V. A. <bar...@gm...> - 2008-08-19 13:15:54
|
On Tue, Aug 19, 2008 at 9:06 AM, chang andrew <and...@gm...> wrote: > I have an question for you. I built my project code to be an binary(image) and upload to our device, Wireless Router. I would like to use the Valgrind to find memory leak. How should I do that? I just know to simulate on PC with JTAG, USB or LAN when the chip set debugging function is available. Our device have LAN only without debugging function as far as I knew. How should I do simulate Valgrind with our device? Re-built our code with Valgrind source code? Which operating system is running on the embedded device, and which CPU does the embedded device have ? Bart. |
|
From: Bart V. A. <bar...@gm...> - 2008-08-20 06:17:57
|
On Wed, Aug 20, 2008 at 5:44 AM, chang andrew <and...@gm...> wrote: > Linux in the embedded device, wireless router, CPU is Atheros AR5211 > wireless chip. The source code are available how to put the Valgrind in our > device? I just know like this. > [root]#valgrind ./test, for example, to memcheck the "test" but I don't know > how to launch the Valgrind in our device. The most convenient way to run embedded software under Valgrind is to install and run Valgrind on the embedded device. You can install Valgrind on the embedded device by either compiling Valgrind on the embedded device itself or by cross-compiling Valgrind on a development system and afterwards transferring the Valgrind binaries to the embedded device. It may be necessary to install more memory on the embedded device in order to run Valgrind successfully. This will only work however if the CPU of the embedded device is supported by Valgrind -- at this time Valgrind supports CPU's with 32 and 64-bit Intel and PowerPC instruction sets. Bart. |
|
From: Daniel Ng <dan...@ly...> - 2008-08-27 01:00:01
|
Bart Van Assche <bart.vanassche <at> gmail.com> writes: > It may be necessary to install more memory on the embedded device in > order to run Valgrind successfully. I was able to get valgrind compiled with uClibc for a powerpc platform, but when I run it I get: # valgrind --leak-check=yes app ==248== Memcheck, a memory error detector. ==248== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==248== Using LibVEX rev 1854, a library for dynamic binary translation. ==248== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==248== Using valgrind-3.3.1, a dynamic binary instrumentation framework. ==248== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==248== For more details, rerun with: -v ==248== ==248== Valgrind's memory management: out of memory: initialiseSector(TC)'s request for 29772288 bytes failed. 17936384 bytes have already been allocated. Valgrind cannot continue. Sorry. There are several possible reasons for this. - You have some kind of memory limit in place. Look at the output of 'ulimit -a'. Is there a limit on the size of virtual memory or address space? - You have run out of swap space. - Valgrind has a bug. If you think this is the case or you are not sure, please let us know and we'll try to fix it. Please note that programs can take substantially more memory than normal when running under Valgrind tools, eg. up to twice or more, depending on the tool. On a 64-bit machine, Valgrind should be able to make use of up 32GB memory. On a 32-bit machine, Valgrind should be able to use all the memory available to a single process, up to 4GB if that's how you have your kernel configured. Most 32-bit Linux setups allow a maximum of 3GB per process. Whatever the reason, Valgrind cannot continue. Sorry. # ulimit unlimited # ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) unlimited stack(kbytes) 8192 coredump(blocks) 0 memory(kbytes) unlimited locked memory(kbytes) 32 process 256 nofiles 1024 vmemory(kbytes) unlimited locks unlimited So does this mean I need a minimum of 30MB virtual mem for Valgrind? The same error message appears, regardless of the app I'm using. My embedded platform has only 32MB of flash, and 32MB of RAM. Can anyone suggest a way around this limitation? |
|
From: Bart V. A. <bar...@gm...> - 2008-08-27 06:18:24
|
On Wed, Aug 27, 2008 at 2:51 AM, Daniel Ng <dan...@ly...> wrote: > So does this mean I need a minimum of 30MB virtual mem for Valgrind? The same > error message appears, regardless of the app I'm using. My embedded platform > has only 32MB of flash, and 32MB of RAM. Can anyone suggest a way around this > limitation? 32MB is really limited for running Valgrind. You will either have to install more memory or attach a hard disk and use it as swap space, depending on what your hardware allows. Bart. |