本文整理汇总了C++中LLMemoryInfo::getPhysicalMemoryKB方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMemoryInfo::getPhysicalMemoryKB方法的具体用法?C++ LLMemoryInfo::getPhysicalMemoryKB怎么用?C++ LLMemoryInfo::getPhysicalMemoryKB使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMemoryInfo
的用法示例。
在下文中一共展示了LLMemoryInfo::getPhysicalMemoryKB方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: title
//.........这里部分代码省略.........
pos_text.setArg("[POSITION]",
llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
support.append(pos_text);
std::string region_text = llformat("in %s located at ",
gAgent.getRegion()->getName().c_str());
support.append(region_text);
std::string buffer;
buffer = gAgent.getRegion()->getHost().getHostName();
support.append(buffer);
support.append(" (");
buffer = gAgent.getRegion()->getHost().getString();
support.append(buffer);
support.append(")\n");
support.append(gLastVersionChannel);
support.append("\n");
support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
support = "\n\n";
}
// *NOTE: Do not translate text like GPU, Graphics Card, etc -
// Most PC users that know what these mean will be used to the english versions,
// and this info sometimes gets sent to support
// CPU
support.append("CPU: ");
support.append( gSysCPU.getCPUString() );
support.append("\n");
U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
// Moved hack adjustment to Windows memory size into llsys.cpp
std::string mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
support.append("OS Version: ");
support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
support.append("\n");
support.append("Graphics Card Vendor: ");
support.append( (const char*) glGetString(GL_VENDOR) );
support.append("\n");
support.append("Graphics Card: ");
support.append( (const char*) glGetString(GL_RENDERER) );
support.append("\n");
#if LL_WINDOWS
getWindow()->incBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
support.append("Windows Graphics Driver Version: ");
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
support.append(driver_info["DriverVersion"]);
}
support.append("\n");
getWindow()->decBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
#endif
support.append("OpenGL Version: ");
示例2: title
// Default constructor
LLFloaterAbout::LLFloaterAbout()
: LLFloater("floater_about", "FloaterAboutRect", "")
{
gUICtrlFactory->buildFloater(this, "floater_about.xml");
// Support for changing product name.
LLString title("About ");
title += LLAppViewer::instance()->getSecondLifeTitle();
setTitle(title);
LLString support;
// Version string
LLString version = LLAppViewer::instance()->getSecondLifeTitle()
+ llformat(" %d.%d.%d.%d Netbook Edition v1.2 %s %s", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__);
//MK
if (RRenabled)
{
version += "\n" + gAgent.mRRInterface.getVersion ();
}
//mk
support.append(version);
support.append("\n\n");
// Position
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
const LLVector3d &pos = gAgent.getPositionGlobal();
LLUIString pos_text = childGetText("you_are_at");
pos_text.setArg("[POSITION]",
llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
//MK
if (RRenabled && gAgent.mRRInterface.mContainsShowloc)
{
pos_text = "(Position hidden)\n";
}
//mk
support.append(pos_text);
LLString region_text = llformat("in %s located at ",
gAgent.getRegion()->getName().c_str());
//MK
if (RRenabled && gAgent.mRRInterface.mContainsShowloc)
{
region_text = "(Region hidden)\n";
}
//mk
support.append(region_text);
//MK
if (!RRenabled || !gAgent.mRRInterface.mContainsShowloc)
{
//mk
char buffer[MAX_STRING]; /*Flawfinder: ignore*/
gAgent.getRegion()->getHost().getHostName(buffer, MAX_STRING);
support.append(buffer);
support.append(" (");
gAgent.getRegion()->getHost().getString(buffer, MAX_STRING);
support.append(buffer);
support.append(")\n");
support.append(gLastVersionChannel);
support.append("\n\n");
//MK
}
else
{
support.append ("(Server info hidden)\n\n");
}
//mk
}
//*NOTE: Do not translate text like GPU, Graphics Card, etc -
// Most PC users that know what these mean will be used to the english versions,
// and this info sometimes gets sent to support
// CPU
support.append("CPU: ");
support.append( gSysCPU.getCPUString() );
support.append("\n");
U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
// Moved hack adjustment to Windows memory size into llsys.cpp
LLString mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
support.append("OS Version: ");
support.append( LLAppViewer::instance()->getOSInfo().getOSString().c_str() );
support.append("\n");
support.append("Graphics Card Vendor: ");
support.append( (const char*) glGetString(GL_VENDOR) );
support.append("\n");
support.append("Graphics Card: ");
support.append( (const char*) glGetString(GL_RENDERER) );
support.append("\n");
//.........这里部分代码省略.........
示例3: getInfo
// static
LLSD LLFloaterAbout::getInfo()
{
// The point of having one method build an LLSD info block and the other
// construct the user-visible About string is to ensure that the same info
// is available to a getInfo() caller as to the user opening
// LLFloaterAbout.
LLSD info;
LLSD version;
version.append(LLVersionInfo::getMajor());
version.append(LLVersionInfo::getMinor());
version.append(LLVersionInfo::getPatch());
version.append(LLVersionInfo::getBuild());
info["VIEWER_VERSION"] = version;
info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion();
info["BUILD_DATE"] = __DATE__;
info["BUILD_TIME"] = __TIME__;
info["CHANNEL"] = LLVersionInfo::getChannel();
info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url();
#if LL_MSVC
info["COMPILER"] = "MSVC";
info["COMPILER_VERSION"] = _MSC_VER;
#elif LL_GNUC
info["COMPILER"] = "GCC";
info["COMPILER_VERSION"] = GCC_VERSION;
#endif
// Position
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
const LLVector3d &pos = gAgent.getPositionGlobal();
info["POSITION"] = ll_sd_from_vector3d(pos);
info["REGION"] = gAgent.getRegion()->getName();
info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
info["SERVER_VERSION"] = gLastVersionChannel;
info["SERVER_RELEASE_NOTES_URL"] = LLWeb::escapeURL(region->getCapability("ServerReleaseNotes"));
}
// CPU
info["CPU"] = gSysCPU.getCPUString();
info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024);
// Moved hack adjustment to Windows memory size into llsys.cpp
info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString();
info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR));
info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER));
#if LL_WINDOWS
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"];
}
#endif
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
info["LIBCURL_VERSION"] = LLCurl::getVersionString();
info["J2C_VERSION"] = LLImageJ2C::getEngineInfo();
bool want_fullname = true;
info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD();
if(LLVoiceClient::getInstance()->voiceEnabled())
{
LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion();
std::ostringstream version_string;
version_string << version.serverType << " " << version.serverVersion << std::endl;
info["VOICE_VERSION"] = version_string.str();
}
else
{
info["VOICE_VERSION"] = LLTrans::getString("NotConnected");
}
// TODO: Implement media plugin version query
info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)";
if (gPacketsIn > 0)
{
info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent();
info["PACKETS_IN"] = F32(gPacketsIn);
info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal();
}
return info;
}
示例4: title
//.........这里部分代码省略.........
support += '\n';
support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
const std::string url(region->getCapability("ServerReleaseNotes"));
if (!url.empty())
{
LLStyleSP server_link_style(new LLStyle(*viewer_link_style));
server_link_style->setLinkHREF(url);
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
}
support = "\n\n";
}
// *NOTE: Do not translate text like GPU, Graphics Card, etc -
// Most PC users that know what these mean will be used to the english versions,
// and this info sometimes gets sent to support
// CPU
support.append("CPU: ");
support.append( gSysCPU.getCPUString() );
support += '\n';
/* This is confusing and WRONG.
support.append("SSE Support:");
if(gSysCPU.hasSSE())
support.append(" SSE2\n");
else if(gSysCPU.hasSSE())
support.append(" SSE\n");
else
support.append(" None\n"); */
U32Megabytes memory = gSysMemory.getPhysicalMemoryKB();
// Moved hack adjustment to Windows memory size into llsys.cpp
std::string mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
support.append("OS Version: ");
support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
support += '\n';
support.append("Graphics Card Vendor: ");
support.append( (const char*) glGetString(GL_VENDOR) );
support += '\n';
support.append("Graphics Card: ");
support.append( (const char*) glGetString(GL_RENDERER) );
support += '\n';
#if LL_WINDOWS
getWindow()->incBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
support.append("Windows Graphics Driver Version: ");
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
support.append(driver_info["DriverVersion"]);
}
support += '\n';
getWindow()->decBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
#endif
support.append("OpenGL Version: ");
示例5: title
//.........这里部分代码省略.........
pos_text.setArg("[POSITION]",
llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]));
support.append(pos_text);
std::string region_text = llformat("in %s located at ",
gAgent.getRegion()->getName().c_str());
support.append(region_text);
std::string buffer;
buffer = gAgent.getRegion()->getHost().getHostName();
support.append(buffer);
support.append(" (");
buffer = gAgent.getRegion()->getHost().getString();
support.append(buffer);
support.append(")\n");
support.append(gLastVersionChannel);
support.append("\n");
support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor"));
support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style);
support = "\n\n";
}
// *NOTE: Do not translate text like GPU, Graphics Card, etc -
// Most PC users that know what these mean will be used to the english versions,
// and this info sometimes gets sent to support
// CPU
support.append("CPU: ");
support.append( gSysCPU.getCPUString() );
support.append("\n");
U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
// Moved hack adjustment to Windows memory size into llsys.cpp
std::string mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
support.append("OS Version: ");
support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
support.append("\n");
support.append("Graphics Card Vendor: ");
support.append( (const char*) glGetString(GL_VENDOR) );
support.append("\n");
support.append("Graphics Card: ");
support.append( (const char*) glGetString(GL_RENDERER) );
support.append("\n");
#if LL_WINDOWS
getWindow()->incBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
support.append("Windows Graphics Driver Version: ");
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
support.append(driver_info["DriverVersion"]);
}
support.append("\n");
getWindow()->decBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
#endif
support.append("OpenGL Version: ");
示例6: get_viewer_misc_info
std::string LLFloaterAbout::get_viewer_misc_info()
{
std::string support;
support.append("CPU: ");
support.append( gSysCPU.getCPUString() );
support.append("\n");
U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024;
// Moved hack adjustment to Windows memory size into llsys.cpp
std::string mem_text = llformat("Memory: %u MB\n", memory );
support.append(mem_text);
support.append("OS Version: ");
support.append( LLAppViewer::instance()->getOSInfo().getOSString() );
support.append("\n");
support.append("Graphics Card Vendor: ");
support.append( (const char*) glGetString(GL_VENDOR) );
support.append("\n");
support.append("Graphics Card: ");
support.append( (const char*) glGetString(GL_RENDERER) );
support.append("\n");
#if LL_WINDOWS
getWindow()->incBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
support.append("Windows Graphics Driver Version: ");
LLSD driver_info = gDXHardware.getDisplayInfo();
if (driver_info.has("DriverVersion"))
{
support.append(driver_info["DriverVersion"]);
}
support.append("\n");
getWindow()->decBusyCount();
getWindow()->setCursor(UI_CURSOR_ARROW);
#endif
support.append("OpenGL Version: ");
support.append( (const char*) glGetString(GL_VERSION) );
support.append("\n");
support.append("\n");
support.append("libcurl Version: ");
support.append( LLCurl::getVersionString() );
support.append("\n");
support.append("J2C Decoder Version: ");
support.append( LLImageJ2C::getEngineInfo() );
support.append("\n");
support.append("Audio Driver Version: ");
bool want_fullname = true;
support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" );
support.append("\n");
// TODO: Implement media plugin version query
support.append("Qt Webkit Version: 4.5.2 ");
support.append("\n");
if (gPacketsIn > 0)
{
std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)",
LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(),
F32(gPacketsIn),
100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) );
support.append(packet_loss);
support.append("\n");
}
return support;
}