In addition to the answer provided here What does the UseCompressedOops JVM flag do and when should I use it?
the 64bit version of JVM cannot run in "32 bit" mode any more
The 64 bit JVM only ever ran in 64 bit mode.
I have heard, that in case when the JVM process is configured with less than 32Gb max heap the JVM automatically optimizes the memory usage by keeping 32bit pointers,
When the heap is less than 32 GB (GB = giga-bytes, Gb = giga-bits) the JVM uses compressed Oops by default in Java 6, 7 and 8.
The JVM uses 32-bit references which are an index to the actual data. i.e. the number used might undergo significant translation to become the actual pointer. You can see this index using Unsafe.getInt().
The default limit for Compressed Oops Java 8 is 64 GB, and you can increase it to 128 GB by changing the object alignment, but it is rarely worth doing this as you lose too much memory to padding.
Does that still apply to 64bit Oracle HotSpot JVM? If yes, how can I switch this behavior off and disable the 32bit memory optimization?
It applies to the Oracle JVM and OpenJDK and you can turn it off using -XX:-UseCompressedOops
but I can't imagine why you would want to.