我正在尝试创建一个图形库。我需要:
int NewDisplay(Display **display, DisplayClass dispClass, int xRes, int yRes)
{
/* create a display:
-- allocate memory for indicated class and resolution
-- pass back pointer to Display object in display
*/
return SUCCESS;
}
如何为类和分辨率分配内存?
答案 0 :(得分:2)
让我猜一下:
int NewDisplay(Display **display, DisplayClass dispClass, int xRes, int yRes)
{
(*display) = new Display( dispClass, xRes, yRes );
return SUCCESS;
}
答案 1 :(得分:0)
如果您需要获取所有服务器端内存详细信息, http://brigitzblog.blogspot.com/2011/11/jspservlet-display-server-memory.html