https://bugs.kde.org/show_bug.cgi?id=432510

--- Comment #3 from Frank Ch. Eigler <f...@redhat.com> ---
The initial use case was hinted at in #c0: to approximate a limited heap to a
program.

> Can you give more details on what errors should be triggered, how they should 
> be reported, and when they should be triggered?

I'm thinking valgrind could grow a new option for memcheck,
--heapsize=<number>, which would be a limit of the total outstanding
malloc-like allocations at any given time.  valgrind would return NULL/ENOMEM
to the application when the limit is hit.  At the 30,000 ft level that'd be
enough for my purposes.  The idea is not to have valgrind detect this as though
it were an error condition (like a use-after-free or something), but to let the
app react to an artificial error.

It's complicated by mmap'd shared libraries, mmap(PRIVATE), sbrk(), ... but I
believe just focusing on the heap alloc/free hook points valgrind tracks would
be super useful for now.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to