failmalloc

Memory allocation failure crash-test tool

Raspbian
RUN apt-get update && \ apt-get install -y failmalloc
click the source code to copy install failmalloc on any operating system with command-not-found.com