diff options
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/indra_constants.h | 10 | ||||
-rw-r--r-- | indra/llcommon/llmemory.cpp | 5 | ||||
-rw-r--r-- | indra/llcommon/llmemtype.h | 2 | ||||
-rw-r--r-- | indra/llcommon/llprocessor.cpp | 14 | ||||
-rw-r--r-- | indra/llcommon/llsdserialize_xml.cpp | 6 | ||||
-rw-r--r-- | indra/llcommon/llsys.cpp | 6 |
6 files changed, 33 insertions, 10 deletions
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index 7f1c48a215..4ef4d21833 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -110,10 +110,12 @@ const char CLOUD_LAYER_CODE = '8'; // keys // Bit masks for various keyboard modifier keys. -const MASK MASK_NONE = 0x0000; -const MASK MASK_CONTROL = 0x0001; -const MASK MASK_ALT = 0x0002; -const MASK MASK_SHIFT = 0x0004; +const MASK MASK_NONE = 0x0000; +const MASK MASK_CONTROL = 0x0001; // Mapped to cmd on Macs +const MASK MASK_ALT = 0x0002; +const MASK MASK_SHIFT = 0x0004; +const MASK MASK_NORMALKEYS = 0x0007; // A real mask - only get the bits for normal modifier keys +const MASK MASK_MAC_CONTROL = 0x0008; // Un-mapped Ctrl key on Macs, not used on Windows // Special keys go into >128 const KEY KEY_SPECIAL = 0x80; // special keys start here diff --git a/indra/llcommon/llmemory.cpp b/indra/llcommon/llmemory.cpp index addda19775..19b8748d2e 100644 --- a/indra/llcommon/llmemory.cpp +++ b/indra/llcommon/llmemory.cpp @@ -49,6 +49,7 @@ S32 LLMemType::sCurType = LLMemType::MTYPE_INIT; S32 LLMemType::sType[LLMemType::MTYPE_MAX_DEPTH]; S32 LLMemType::sMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 }; S32 LLMemType::sMaxMemCount[LLMemType::MTYPE_NUM_TYPES] = { 0 }; +S32 LLMemType::sNewCount[LLMemType::MTYPE_NUM_TYPES] = { 0 }; S32 LLMemType::sOverheadMem = 0; const char* LLMemType::sTypeDesc[LLMemType::MTYPE_NUM_TYPES] = @@ -113,7 +114,7 @@ void LLMemType::printMem() { if (sMemCount[i]) { - llinfos << llformat("MEM: % 20s %03d MB (%03d MB)",sTypeDesc[i],sMemCount[i]>>20,sMaxMemCount[i]>>20) << llendl; + llinfos << llformat("MEM: % 20s %03d MB (%03d MB) in %06d News",sTypeDesc[i],sMemCount[i]>>20,sMaxMemCount[i]>>20, sNewCount[i]) << llendl; } misc_mem -= sMemCount[i]; } @@ -160,6 +161,7 @@ void* ll_allocate (size_t size) { LLMemType::sMaxMemCount[LLMemType::sCurType] = LLMemType::sMemCount[LLMemType::sCurType]; } + LLMemType::sNewCount[LLMemType::sCurType]++; #endif return (void*)p; } @@ -185,6 +187,7 @@ void ll_release (void *pin) #if MEM_TRACK_TYPE LLMemType::sMemCount[type] -= size; LLMemType::sOverheadMem -= 4; + LLMemType::sNewCount[type]--; #endif LLMemType::sTotalMem -= size; free(p); diff --git a/indra/llcommon/llmemtype.h b/indra/llcommon/llmemtype.h index 53f7f66285..a101f35628 100644 --- a/indra/llcommon/llmemtype.h +++ b/indra/llcommon/llmemtype.h @@ -21,6 +21,7 @@ extern void ll_release (void *p); #define MEM_TRACK_TYPE (1 && MEM_TRACK_MEM) #if MEM_TRACK_TYPE +#define MEM_DUMP_DATA 1 #define MEM_TYPE_NEW(T) \ static void* operator new(size_t s) { LLMemType mt(T); return ll_allocate(s); } \ static void operator delete(void* p) { ll_release(p); } @@ -123,6 +124,7 @@ public: static S32 sType[MTYPE_MAX_DEPTH]; static S32 sMemCount[MTYPE_NUM_TYPES]; static S32 sMaxMemCount[MTYPE_NUM_TYPES]; + static S32 sNewCount[MTYPE_NUM_TYPES]; static S32 sOverheadMem; static const char* sTypeDesc[MTYPE_NUM_TYPES]; #endif diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index bcabb47a66..3ff41a0104 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -280,7 +280,7 @@ bool CProcessor::AnalyzeIntelProcessor() strcpy(CPUInfo.strFamily, "Intel Pentium"); /* Flawfinder: ignore */ break; case 6: // Family = 6: Pentium Pro (80686) processor family - strcpy(CPUInfo.strFamily, "Intel Pentium Pro"); /* Flawfinder: ignore */ + strcpy(CPUInfo.strFamily, "Intel Pentium Pro/2/3, Core"); /* Flawfinder: ignore */ break; case 15: // Family = 15: Extended family specific // Masking the extended family @@ -476,9 +476,17 @@ bool CProcessor::AnalyzeIntelProcessor() break; } break; + case 0xE: // Model = 0xE: Intel Core Duo processor, Intel Core Solo processor, model E + strcpy(CPUInfo.strModel, "Intel Core Duo/Solo Processor"); /*Flawfinder: ignore*/ + strncat(strCPUName, "Intel Core Duo/Solo Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ + break; + case 0xF: // Model = 0xF: Intel Core 2 Duo processor, model F + strcpy(CPUInfo.strModel, "Intel Core2 Duo Processor"); /*Flawfinder: ignore*/ + strncat(strCPUName, "Intel Core2 Duo Processor", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ + break; default: // *more bored* - strcpy(CPUInfo.strModel, "Unknown Intel Pentium Pro"); /*Flawfinder: ignore*/ - strncat(strCPUName, "Intel Pentium Pro (Unknown model)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ + strcpy(CPUInfo.strModel, "Unknown Intel Pentium Pro/2/3, Core"); /*Flawfinder: ignore*/ + strncat(strCPUName, "Intel Pentium Pro/2/3, Core (Unknown model)", sizeof(strCPUName)-(strlen(strCPUName)-1)); /*Flawfinder: ignore*/ break; } break; diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index de4f3197e6..4ca47ba8dc 100644 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -16,7 +16,11 @@ extern "C" { -#include "expat/expat.h" +#ifdef LL_STANDALONE +# include <expat.h> +#else +# include "expat/expat.h" +#endif } /** diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 90cc374ade..3398f475aa 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -11,7 +11,11 @@ #include "llsys.h" #include <iostream> -#include <zlib/zlib.h> +#ifdef LL_STANDALONE +# include <zlib.h> +#else +# include "zlib/zlib.h" +#endif #include "processor.h" |