~kline/geiger

geiger/demo_target/main.c -rw-r--r-- 296 bytes
e8d948bdGareth Pulham Make it an LD_PRELOADable library with demo 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#define _XOPEN_SOURCE 500

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

int main(){
    for (;;){
        usleep(rand()%100000);
        void* mem = malloc(1000);
        if (mem != NULL){
            //printf("malloc()d\n");
            free(mem);
        }
    }
    return 0;
}