added ifdefs for HAS_AUDIT_CHILDREN and added more memory tracking stats