great update

use VirtualAlloc to replace the global char array