modernc.org/libc@v1.24.1/testdata/memgrind/leak.c (about)

     1  // This program leaks memory.
     2  //
     3  // Compile to Go: `$ ccgo -o main.go leak.c`.
     4  //
     5  // To run the resulting Go code: `$ go run main.go`.
     6  //
     7  // To run the resulting Go code with memgrind: `$ go run -tags=libc.memgrind main.go`.
     8  
     9  #include <stdlib.h>
    10  
    11  int main() {
    12  	malloc(42);
    13  }