new mem_get_cur_usage(), mem_get_max_usage(), get_cmem_usage() C functions

- new get_cmem_usage()