add comments and remove legacy 32MB constraint in setMemoryLimit; correct console buffer character type on windows