#include <my_assert.h>

void entry (void)
{
    int i, j;
    char *p[20][100];
    printf ("dump fragmentation\n");
    fflush (stdout);
    for (j = 0; j < 20; j++)
    for (i = 0; i < 100; i++) {
        p[j][i] = (char *) malloc (i);
    }
    printf ("\nafter alloc ====>\n");
    dfwmalloc_efficiency ();
    for (j = 0; j < 20; j++)
    for (i = 0; i < 100; i++) {
        free (p[j][i]);
    }
    printf ("\nafter free ====>\n");
    dfwmalloc_efficiency ();
    dfwmalloc_truncate_heap();
    printf ("\nafter truncate ====>\n");
    dfwmalloc_efficiency ();
}

