mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 06:12:55 +00:00
14 lines
275 B
C
14 lines
275 B
C
// This program leaks memory.
|
|
//
|
|
// Compile to Go: `$ ccgo -o main.go leak.c`.
|
|
//
|
|
// To run the resulting Go code: `$ go run main.go`.
|
|
//
|
|
// To run the resulting Go code with memgrind: `$ go run -tags=libc.memgrind main.go`.
|
|
|
|
#include <stdlib.h>
|
|
|
|
int main() {
|
|
malloc(42);
|
|
}
|