File indexing completed on 2024-04-28 09:36:42

0001 /*
0002     SPDX-FileCopyrightText: 2014-2017 Milian Wolff <mail@milianw.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #include <unistd.h>
0008 #include <stdlib.h>
0009 #include <stdio.h>
0010 
0011 #include "../benchutil.h"
0012 
0013 int main()
0014 {
0015     int i;
0016     // make app deterministic
0017     srand(0);
0018     void* p = malloc(1);
0019     for (i = 0; i < 10000; ++i) {
0020         void* l = malloc(rand() % 1000);
0021         escape(l);
0022         usleep(100);
0023     }
0024     printf("malloc: %p\n", p);
0025     free(p);
0026     return 0;
0027 }