A Dockerfile with GPerftools installed:

C/Java code that showcases locality behavior: