IRVINE, Calif. - June 06, 2005 - Blizzard Entertainment? today announced that World of Warcraft?, its massively multiplayer online role-playing game (MMORPG), has officially launched in China. Players in China can now download the game, create accounts and experience the epic adventure of the Warcraft? series in an immersive and continually evolving online environment. The commercial launch of World of Warcraft follows a highly successful open beta period in China during which the game reached a peak concurrency - the total number of subscribers playing simultaneously - of more than 500,000 players.
"It has always been a goal at Blizzard to become a major developer and publisher for the Chinese gaming market," said Mike Morhaime, president and co-founder of Blizzard Entertainment. "We feel that China offers a huge and eager audience and it is poised to become the next great region in gaming. We are simply thrilled to be bringing World of Warcraft to this great country. With fully localized content, a regional network infrastructure, and local, around-the-clock customer support, we believe that World of Warcraft will provide Chinese gamers with an unparalleled game experience."
To provide players with an incomparable level of service, Blizzard Entertainment has partnered with local publisher The9, who it believes to be the most talented MMO operator in China. The9 will help operate and manage World of Warcraft in China, including all aspects of support. The9's dedicated team, composed entirely of Chinese management and staff, will serve as an integral part of the game's development and customer service efforts. They will assist in the synchronization of content updates, the delivery of player feedback to the developers, and will help ensure accurate localization to keep the game relevant and tailored to Chinese gamers. Furthermore, this local team will offer 24-hour support year around, with direct game master (GM) support and local call-center representatives dedicated to helping players with questions regarding gameplay and/or technical issues.
To deliver top-notch customer support and maintain a safe and secure service, Blizzard and The9 have implemented an authorization CD-key system for the official launch of World of Warcraft. This system will help protect the game from malicious hack programs that could otherwise affect players' enjoyment of the game.
Only players who have purchased an authorized CD key will be able to activate their accounts and enter the game. Each CD key costs 30 Yuan/RMB and can be purchased with a World of Warcraft Points Card. Point Cards also cost 30 Yuan/RMB and can be used at a rate of 9 points per hour (0.45 Yuan/hour) to play World of Warcraft.
需要包含頭文件:
#include <alloc.h>
或
#include <stdlib.h>
函數(shù)聲明(函數(shù)原型):
void *malloc(int size);
說(shuō)明:malloc 向系統(tǒng)申請(qǐng)分配指定size個(gè)字節(jié)的內(nèi)存空間。返回類(lèi)型是 void* 類(lèi)型。void* 表示未確定類(lèi)型的指針。C,C++規(guī)定,void* 類(lèi)型可以強(qiáng)制轉(zhuǎn)換為任何其它類(lèi)型的指針。
從函數(shù)聲明上可以看出。malloc 和 new 至少有兩個(gè)不同: new 返回指定類(lèi)型的指針,并且可以自動(dòng)計(jì)算所需要大小。比如:
int *p;
p = new int; //返回類(lèi)型為int* 類(lèi)型(整數(shù)型指針),分配大小為 sizeof(int);
或:
int* parr;
parr = new int [100]; //返回類(lèi)型為 int* 類(lèi)型(整數(shù)型指針),分配大小為 sizeof(int) * 100;
而 malloc 則必須由我們計(jì)算要字節(jié)數(shù),并且在返回后強(qiáng)行轉(zhuǎn)換為實(shí)際類(lèi)型的指針。
int* p;
p = (int *) malloc (sizeof(int));
第一、malloc 函數(shù)返回的是 void * 類(lèi)型,如果你寫(xiě)成:p = malloc (sizeof(int)); 則程序無(wú)法通過(guò)編譯,報(bào)錯(cuò):“不能將 void* 賦值給 int * 類(lèi)型變量”。所以必須通過(guò) (int *) 來(lái)將強(qiáng)制轉(zhuǎn)換。
第二、函數(shù)的實(shí)參為 sizeof(int) ,用于指明一個(gè)整型數(shù)據(jù)需要的大小。如果你寫(xiě)成:
int* p = (int *) malloc (1);
代碼也能通過(guò)編譯,但事實(shí)上只分配了1個(gè)字節(jié)大小的內(nèi)存空間,當(dāng)你往里頭存入一個(gè)整數(shù),就會(huì)有3個(gè)字節(jié)無(wú)家可歸,而直接“住進(jìn)鄰居家”!造成的結(jié)果是后面的內(nèi)存中原有數(shù)據(jù)內(nèi)容全部被清空。
malloc 也可以達(dá)到 new [] 的效果,申請(qǐng)出一段連續(xù)的內(nèi)存,方法無(wú)非是指定你所需要內(nèi)存大小。
比如想分配100個(gè)int類(lèi)型的空間:
int* p = (int *) malloc ( sizeof(int) * 100 ); //分配可以放得下100個(gè)整數(shù)的內(nèi)存空間。
另外有一點(diǎn)不能直接看出的區(qū)別是,malloc 只管分配內(nèi)存,并不能對(duì)所得的內(nèi)存進(jìn)行初始化,所以得到的一片新內(nèi)存中,其值將是隨機(jī)的。
除了分配及最后釋放的方法不一樣以外,通過(guò)malloc或new得到指針,在其它操作上保持一致。