--- old/src/share/vm/utilities/globalDefinitions.hpp 2015-02-19 16:21:14.229731001 +0100 +++ new/src/share/vm/utilities/globalDefinitions.hpp 2015-02-19 16:21:14.050040144 +0100 @@ -1346,6 +1346,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