Use one's own malloc/free

Here is an example showing a simple way to use user-defined malloc/free:

https://github.com/githwxi/ATS-Postiats/tree/master/doc/EXAMPLE/CA-HSR2/program-1-2

The flag -DATS_MEMALLOC_USER indicates to the ATS compiler that the
following
two functions are used for memory allocation/deallocation:

extern
void
*atsruntime_malloc_user (size_t bsz) ;

extern
void atsruntime_mfree_user (void* ptr) ;