start: check maxcount in malloc