--- old/src/share/vm/utilities/globalDefinitions.hpp 2015-03-12 18:26:01.415012765 +0100 +++ new/src/share/vm/utilities/globalDefinitions.hpp 2015-03-12 18:26:01.235176039 +0100 @@ -1354,6 +1354,13 @@ return (intptr_t) p; } +// swap a & b +template static void swap(T& a, T& b) { + T tmp = a; + a = b; + b = tmp; +} + // Printf-style formatters for fixed- and variable-width types as pointers and // integers. These are derived from the definitions in inttypes.h. If the platform // doesn't provide appropriate definitions, they should be provided in