mmeemmookk() -- General Function (libc)

Test if the arena is corrupted
iinntt
mmeemmookk();

The library function mmeemmookk() checks to see if the arena has been corrupted.
It returns one if the arena is sound, and zero if it has been corrupted.

_E_x_a_m_p_l_e
The following example purposely corrupts the arena, to demonstrate mmeemmookk().
Please note that this is not a recommended programming practice.

extern char *malloc();
main()
{
    char *p;

     p = malloc(2);           /* get 2 bytes of memory */
     printf("Arena is %s\n", memok() ? "OK" : "bad");
     strcpy(p, "too long");   /* clobber memory */
     printf("Arena is %s\n", memok() ? "OK" : "bad");
}

_S_e_e _A_l_s_o
aarreennaa, ccaalllloocc(), lliibbcc, mmaalllloocc(), rreeaalllloocc()
