/* Little program used to test and debug mapmalloc */ #include #include #include #include #include static void a() { } static void b() { malloc(1000); a(); } static void c() { b(); } static void d() { c(); } static void e() { d(); } static void f(bool do_realloc, bool do_2free) { void *pt = malloc(100); e(); if (do_realloc) pt = realloc(pt,120); free (pt); if (do_2free) free (pt); } int main (int argc, char *argv[]) { bool do_realloc = false; bool do_2free = false; bool do_fork = false; bool do_stop = false; for (int i=1; i