public static void UpdateStateMemory() {
		if (m_sStateTimer == 0) {
			m_VectorForAlloc = new int[STATE.MEMORY.MAX_KEY_PRESSED][];
			m_VectorForAllocIndex = 0;
			m_iTotalAllocatedMemory = 0;
			m_iSystemGCTimer = 0;
		}

		if (m_iSystemGCTimer-- > 0) {
			System.gc();
		}

		if (KeyPressed(KEY.NUMERIC1)) {
			m_VectorForAlloc[m_VectorForAllocIndex++] = AllocVectorForStateMemory(100 * 1024 / 4);
			m_iTotalAllocatedMemory += 100 * 1024;
		}

		if (KeyPressed(KEY.NUMERIC2)) {
			m_VectorForAlloc[m_VectorForAllocIndex++] = AllocVectorForStateMemory(50 * 1024 / 4);
			m_iTotalAllocatedMemory += 50 * 1024;
		}

		if (KeyPressed(KEY.NUMERIC3)) {
			m_VectorForAlloc[m_VectorForAllocIndex++] = AllocVectorForStateMemory(5 * 1024 / 4);
			m_iTotalAllocatedMemory += 5 * 1024;
		}

		if (KeyPressed(KEY.NUMERIC4)) {
			m_VectorForAlloc[m_VectorForAllocIndex++] = AllocVectorForStateMemory(1024 / 4);
			m_iTotalAllocatedMemory += 1024;
		}

		if (KeyPressed(KEY.NUMERIC5)) {
			m_iSystemGCTimer = STATE.MEMORY.NUM_FRAMES_FOR_SYSTEM_GC;
		}

		if (KeyPressed(KEY.STAR)) {
			ChangeState(STATE.MAIN_MENU.ID);
			m_VectorForAlloc = null;
		}

		if (KeyPressed(KEY.POUND)) {
			int params[] = {STATE.MEMORY.ID};
			ChangeState(STATE.DISPLAY_RESULT.ID, params);
			m_DisplayResultString = StringPak.GetString(STRPACK.MEMORY_HELP);
		}
	}