There is no way at present.  You could hack vg_replace_malloc.c to
do what you want, perhaps.  The difficult bit is dealing with threaded
programs -- it may be that the number of allocations up to a given
point in the program depends on the thread scheduling, so you don't
really have a reliable way to incrementally test the failure of each
allocation point.

J

On Friday, April 13, 2012, Anatoly Yakovenko wrote:
> I would like to test my program's handling of alloc failures.  is
> there anyway to tell valgrind when to fail after N number of mallocs?
> 
> Thanks,
> Anatoly
> 
> ---------------------------------------------------------------------------
> --- For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Valgrind-users mailing list
> Valgrind-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/valgrind-users


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to