track max used memory