From d3924200b6b8817461c0f10f87a643005466d4af Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sun, 23 Sep 2012 03:06:11 +0000 Subject: Removing unused gHeadlessClient code from viewer --- indra/llwindow/llwindowsdl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 3bf4a48cb6..de731df228 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -186,7 +186,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, S32 x, S32 y, S32 width, S32 height, U32 flags, BOOL fullscreen, BOOL clearBg, - BOOL disable_vsync, BOOL use_gl, + BOOL disable_vsync, BOOL ignore_pixel_depth, U32 fsaa_samples) : LLWindow(callbacks, fullscreen, flags), Lock_Display(NULL), @@ -197,7 +197,6 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, gKeyboard->setCallbacks(callbacks); // Note that we can't set up key-repeat until after SDL has init'd video - // Ignore use_gl for now, only used for drones on PC mWindow = NULL; mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; -- cgit v1.2.3 From c06c35609c6683731eaea283468f6b32af18fea2 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Thu, 11 Oct 2012 00:09:04 +0000 Subject: Updating linux build to gcc4.6 --- indra/llwindow/llwindowsdl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index de731df228..c7b141d7c1 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1643,24 +1643,24 @@ void check_vm_bloat() const long long significant_vm_difference = 250 * 1024*1024; const long long significant_rss_difference = 50 * 1024*1024; - ssize_t res; size_t dummy; char *ptr; - for (int i=0; i<22; ++i) // parse past the values we don't want + size_t delim_result = 0; + for (int i=0; i<22 && delim_result > -1; ++i) // parse past the values we don't want { ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); free(ptr); } // 23rd space-delimited entry is vsize ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_vm_size = atoll(ptr); free(ptr); // 24th space-delimited entry is RSS ptr = NULL; - res = getdelim(&ptr, &dummy, ' ', fp); + delim_result = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_rss_size = getpagesize() * atoll(ptr); free(ptr); -- cgit v1.2.3 From 9ea6a96be9a5fda489d5e5ce28fc2df7c6f4c309 Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 11 Mar 2013 17:29:05 -0400 Subject: LLWindow merge fixes for Mac --- indra/llwindow/llwindowsdl.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 0d2e0f78c1..a15114cb9b 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -186,7 +186,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, const std::string& title, S32 x, S32 y, S32 width, S32 height, U32 flags, BOOL fullscreen, BOOL clearBg, - BOOL disable_vsync, + BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth, U32 fsaa_samples) : LLWindow(callbacks, fullscreen, flags), Lock_Display(NULL), @@ -197,6 +197,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, gKeyboard->setCallbacks(callbacks); // Note that we can't set up key-repeat until after SDL has init'd video + // Ignore use_gl for now, only used for drones on PC mWindow = NULL; mNeedsResize = FALSE; mOverrideAspectRatio = 0.f; @@ -1643,24 +1644,24 @@ void check_vm_bloat() const long long significant_vm_difference = 250 * 1024*1024; const long long significant_rss_difference = 50 * 1024*1024; + ssize_t res; size_t dummy; char *ptr; - size_t delim_result = 0; - for (int i=0; i<22 && delim_result > -1; ++i) // parse past the values we don't want + for (int i=0; i<22; ++i) // parse past the values we don't want { ptr = NULL; - delim_result = getdelim(&ptr, &dummy, ' ', fp); + res = getdelim(&ptr, &dummy, ' ', fp); free(ptr); } // 23rd space-delimited entry is vsize ptr = NULL; - delim_result = getdelim(&ptr, &dummy, ' ', fp); + res = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_vm_size = atoll(ptr); free(ptr); // 24th space-delimited entry is RSS ptr = NULL; - delim_result = getdelim(&ptr, &dummy, ' ', fp); + res = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); long long this_rss_size = getpagesize() * atoll(ptr); free(ptr); -- cgit v1.2.3 From cec50f8c142f4ff5f8358d9fa27884dd14f77eff Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Wed, 13 Mar 2013 19:17:13 +0000 Subject: Fix for gcc 4.6 build failures on Linux in llwindowsdl.cpp --- indra/llwindow/llwindowsdl.cpp | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index a15114cb9b..205466e936 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1636,35 +1636,53 @@ void check_vm_bloat() { #if LL_LINUX // watch our own VM and RSS sizes, warn if we bloated rapidly - FILE *fp = fopen("/proc/self/stat", "r"); + static const std::string STATS_FILE = "/proc/self/stat"; + FILE *fp = fopen(STATS_FILE.c_str(), "r"); if (fp) { static long long last_vm_size = 0; static long long last_rss_size = 0; const long long significant_vm_difference = 250 * 1024*1024; const long long significant_rss_difference = 50 * 1024*1024; + long long this_vm_size = 0; + long long this_rss_size = 0; ssize_t res; size_t dummy; - char *ptr; + char *ptr = NULL; for (int i=0; i<22; ++i) // parse past the values we don't want { - ptr = NULL; res = getdelim(&ptr, &dummy, ' ', fp); + if (-1 == res) + { + llwarns << "Unable to parse " << STATS_FILE << llendl; + goto finally; + } free(ptr); + ptr = NULL; } // 23rd space-delimited entry is vsize - ptr = NULL; res = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); - long long this_vm_size = atoll(ptr); + if (-1 == res) + { + llwarns << "Unable to parse " << STATS_FILE << llendl; + goto finally; + } + this_vm_size = atoll(ptr); free(ptr); - // 24th space-delimited entry is RSS ptr = NULL; + // 24th space-delimited entry is RSS res = getdelim(&ptr, &dummy, ' ', fp); llassert(ptr); - long long this_rss_size = getpagesize() * atoll(ptr); + if (-1 == res) + { + llwarns << "Unable to parse " << STATS_FILE << llendl; + goto finally; + } + this_rss_size = getpagesize() * atoll(ptr); free(ptr); + ptr = NULL; llinfos << "VM SIZE IS NOW " << (this_vm_size/(1024*1024)) << " MB, RSS SIZE IS NOW " << (this_rss_size/(1024*1024)) << " MB" << llendl; @@ -1697,6 +1715,12 @@ void check_vm_bloat() last_rss_size = this_rss_size; last_vm_size = this_vm_size; +finally: + if (NULL != ptr) + { + free(ptr); + ptr = NULL; + } fclose(fp); } #endif // LL_LINUX -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/llwindow/llwindowsdl.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/llwindow/llwindowsdl.cpp (limited to 'indra/llwindow/llwindowsdl.cpp') diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp old mode 100644 new mode 100755 -- cgit v1.2.3