|
From: Dennis L. <pla...@gm...> - 2004-08-31 21:50:10
|
Hello, since supporting systems with low memory or even ulimit -v set seems to be a "non-goal" for valgrind, maybe valgrind itself could have an option to limit the memory available to a program ? I would like to test my programs behaviour in low-mem conditions with valgrind, since it should run on systems with much lower memory than I develop it on. So some --limit-memory=16M option would be really cool. greets Dennis Carpe quod tibi datum est |
|
From: Robert W. <rj...@du...> - 2004-08-31 22:18:55
|
On Tue, 2004-08-31 at 23:50 +0200, Dennis Lubert wrote: > since supporting systems with low memory or even ulimit -v set seems to be > a "non-goal" for valgrind, maybe valgrind itself could have an option to > limit the memory available to a program ? I would like to test my programs > behaviour in low-mem conditions with valgrind, since it should run on > systems with much lower memory than I develop it on. So some > --limit-memory=16M option would be really cool. Great idea. |
|
From: Nicholas N. <nj...@ca...> - 2004-09-02 14:21:49
|
On Tue, 31 Aug 2004, Robert Walsh wrote: >> since supporting systems with low memory or even ulimit -v set seems to be >> a "non-goal" for valgrind, maybe valgrind itself could have an option to >> limit the memory available to a program ? I would like to test my programs >> behaviour in low-mem conditions with valgrind, since it should run on >> systems with much lower memory than I develop it on. So some >> --limit-memory=16M option would be really cool. > > Great idea. How would this work? Would Valgrind (Memcheck?) just abort if the client used more than the limit? N |
|
From: Tom S. <to...@pl...> - 2004-09-02 15:15:56
|
Nicholas Nethercote wrote: > On Tue, 31 Aug 2004, Robert Walsh wrote: > >>> since supporting systems with low memory or even ulimit -v set seems >>> to be >>> a "non-goal" for valgrind, maybe valgrind itself could have an option to >>> limit the memory available to a program ? I would like to test my >>> programs >>> behaviour in low-mem conditions with valgrind, since it should run on >>> systems with much lower memory than I develop it on. So some >>> --limit-memory=16M option would be really cool. >> >> >> Great idea. > > > How would this work? Would Valgrind (Memcheck?) just abort if the > client used more than the limit? > > N That doesn't sound right. I would think that you would want to return NULL from malloc(), and print a message with the current stack. That way he can make sure that the app recovers gracefully, and if it doesn't, he knows where the app initially ran into the memory ceiling. -- Tom Schutter (mailto:to...@pl...) Platte River Associates, Inc. (http://www.platte.com) |