mips - Set memory limit to Valgrind -



mips - Set memory limit to Valgrind -

i'm trying run valgrind on mips32 machine in order observe memory leak. total available memory 32mb (without swap). problem valgrind not able allocate amount of memory needs , generates "out of memory" error.

root@babidi# valgrind --leak-check=yes grep -r "foo" /etc/config/ ==9392== memcheck, memory error detector ==9392== copyright (c) 2002-2012, , gnu gpl'd, julian seward et al. ==9392== using valgrind-3.8.1 , libvex; rerun -h copyright info ==9392== command: grep -r foo /etc/config/ ==9392== ==9392== ==9392== valgrind's memory management: out of memory: ==9392== initialisesector(tc)'s request 27597024 bytes failed. ==9392== 20516864 bytes have been allocated. ==9392== valgrind cannot continue. sorry. ==9392== ==9392== there several possible reasons this. ==9392== - have kind of memory limit in place. @ ==9392== output of 'ulimit -a'. there limit on size of ==9392== virtual memory or address space? ==9392== - have run out of swap space. ==9392== - valgrind has bug. if think case or ==9392== not sure, please allow know , we'll seek prepare it. ==9392== please note programs can take substantially more memory ==9392== normal when running under valgrind tools, eg. twice or ==9392== more, depending on tool. on 64-bit machine, valgrind ==9392== should able create utilize of 32gb memory. on 32-bit ==9392== machine, valgrind should able utilize memory available ==9392== single process, 4gb if that's how have ==9392== kernel configured. 32-bit linux setups allow maximum of ==9392== 3gb per process. ==9392== ==9392== whatever reason, valgrind cannot continue. sorry.

what i'm wondering if possible limit amount of memory valgrind allocates. tried playing --max-stacksize , --max-stackframe result same.

as mentioned in comments, 32mb not much. must cover os , other necessary processes. when analyze programme valgrind/memcheck, requires more twice much memory programme itself. because memcheck stores shadow values every allocated bit, can recognize uninitialized variables.

i think best solution compile programme desktop computer , run memcheck there. if have leaks, uninitialized variables, etc in program, have them on desktop computer well.

if curious how programme behave on mips, analyze other valgrind tools, such massif (measuring heap on time) , cachegrind (cache performance). much more light-weigth memcheck.

out-of-memory mips valgrind

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -