Age | Commit message (Collapse) | Author |
|
|
|
|
|
This is only transitional, until we integrate the Viewer Management Process
(soon now).
|
|
|
|
|
|
|
|
There were two distinct LLMemory methods getCurrentRSS() and
getWorkingSetSize(). It was pointless to have both: on Windows they were
completely redundant; on other platforms getWorkingSetSize() always returned
0. (Amusingly, though the Windows implementations both made exactly the same
GetProcessMemoryInfo() call and used exactly the same logic, the code was
different in the two -- as though the second was implemented without awareness
of the first, even though they were adjacent in the source file.)
One of the actual MAINT-6996 problems was due to the fact that
getWorkingSetSize() returned U32, where getCurrentRSS() returns U64. In other
words, getWorkingSetSize() was both useless *and* wrong. Remove it, and change
its one call to getCurrentRSS() instead.
The other culprit was that in several places, the 64-bit WorkingSetSize
returned by the Windows GetProcessMemoryInfo() call (and by getCurrentRSS())
was explicitly cast to a 32-bit data type. That works only when explicitly or
implicitly (using LLUnits type conversion) scaling the value to kilobytes or
megabytes. When the size in bytes is desired, use 64-bit types instead.
In addition to the symptoms, LLMemory was overdue for a bit of cleanup.
There was a 16K block of memory called reserveMem, the comment on which read:
"reserve 16K for out of memory error handling." Yet *nothing* was ever done
with that block! If it were going to be useful, one would think someone would
at some point explicitly free the block. In fact there was a method
freeReserve(), apparently for just that purpose -- which was never called. As
things stood, reserveMem served only to *prevent* the viewer from ever using
that chunk of memory. Remove reserveMem and the unused freeReserve().
The only function of initClass() and cleanupClass() was to allocate and free
reserveMem. Remove initClass(), cleanupClass() and the LLCommon calls to them.
In a similar vein, there was an LLMemoryInfo::getPhysicalMemoryClamped()
method that returned U32Bytes. Its job was simply to return a size in bytes
that could fit into a U32 data type, returning U32_MAX if the 64-bit value
exceeded 4GB. Eliminate that; change all its calls to getPhysicalMemoryKB()
(which getPhysicalMemoryClamped() used internally anyway). We no longer care
about any platform that cannot handle 64-bit data types.
|
|
|
|
|
|
LLWinDebug, though an LLSingleton, had (and required explicit calls to)
special init() and cleanup() methods. Kitty Barnett points out that the
cleanup() method was actually being called after LLSingletonBase::deleteAll(),
requiring resurrection of the deleted LLWinDebug, which sometimes led to
crashes. (Resurrecting deleted LLSingletons is always suspect.)
Change LLWinDebug::init() and cleanup() to the conventional initSingleton()
and cleanupSingleton() methods. This eliminates the need to make special
method calls at all. In particular, cleanupSingleton() will be called by the
existing LLSingletonBase::cleanupAll() call near viewer shutdown.
We retain the early LLWinDebug::instance() call, which implicitly initializes
the LLWinDebug instance, because evidently we want that initialized early. But
we no longer require a separate init() call.
|
|
The comment indicates that calling LLSingletonBase::deleteAll() is optional
because the LLSingleton machinery implicitly calls that during final
static-object cleanup. That is no longer true.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
used during construction of the eventual installation .dmg.
With newer 64-bit Havok packages, we need more elbow room on the temporary
volume.
|
|
useful during testing SLPlugin changes. Not shipped with release versions of viewer
|
|
working ' appears.
|
|
|
|
|
|
- this change also fixes MAINT-5365 Windows viewer uninstall icon is system default not SL logo
|
|
|
|
|
|
The previous LLSafeHandle<T> implementation declares a static data member of
the template class but provides no (generic) definition, relying on particular
specializations to provide the definition. The data member is a function
pointer, which is called in one of the methods to produce a pointer to a
"null" T instance: that is, a dummy instance to be dereferenced in case the
wrapped T* is null.
Xcode 8.3's version of clang is bothered by the call, in a generic method,
through this (usually) uninitialized pointer. It happens that the only
specializations of LLSafeHandle do both provide definitions. I don't know
whether that's formally valid C++03 or not; but I agree with the compiler: I
don't like it.
Instead of declaring a public static function pointer which each
specialization is required to define, add a protected static method to the
template class. This protected static method simply returns a pointer to a
function-static T instance. This is functionally similar to a static
LLPointer<T> set on demand (as in the two specializations), including lazy
instantiation.
Unlike the previous implementation, this approach prohibits a given
specialization from customizing the "null" instance function. Although there
exist reasonable ways to support that (e.g. a related traits template), I
decided not to complicate the LLSafeHandle implementation to make it more
generally useful. I don't really approve of LLSafeHandle, and don't want to
see it proliferate. It's not clear that unconditionally dereferencing
LLSafeHandle<T> is in any way better than conditionally dereferencing
LLPointer<T>. It doesn't even skip the runtime conditional test; it simply
obscures it. (There exist hints in the code that at one time it might have
immediately replaced any wrapped null pointer value with the pointer to the
"null" instance, obviating the test at dereference time, but this is not the
current functionality. Perhaps it was only ever wishful thinking.)
Remove the corresponding functions and static LLPointers from the two classes
that use LLSafeHandle.
|
|
|
|
containing object is in another region
|
|
|
|
|
|
moving
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unless visible
|
|
|
|
|
|
|
|
|
|
moving
|
|
floater
|
|
|
|
p64_3p-Dullahan -> media_plugin_cef.cpp to current latest version' puzzle - fix @rpath/@executable paths for macOS
|