It has never happened to me, and I\'ve programming for years now.
Can someone give me an example of a non-trivial program in which malloc will actually
malloc
Yes.
Just try to malloc more memory than your system can provide (either by exhausting your address space, or virtual memory - whichever is smaller).
malloc(SIZE_MAX)
will probably do it. If not, repeat a few times until you run out.