SharedHeap::fill_region_with_object has some issues with ...
Usability: it requires a MemRegion to be passed in, but its designated purpose means that a MemRegion is almost never available at the call site, so one must be constructed just for the call, causing unnecessary obfuscation.
Safety: it will silently fail to properly fill large regions.
Usability: Move the filler object creation code from SharedHeap to CollectedHeap since all collectors inherit from CollectedHeap. Change the interface to accept a start address and length in words and include an overloaded inline method that accepts a MemRegion for compability. Replace the custom filler object code in PSMarkSweepDecorator::insert_deadspace() and CompactibleSpace::insert_deadspace() with calls to the common routines. Use a separate Klass oop for for the filler objs (at least those large enough to be filled with an array) so they can be distinguished from user-created int arrays.
Safety: allow filling of large regions (>= 8G, the largest int array) in the 64-bit VM with a routine that can create multiple filler objects.
Misc: tighten up the implementation of arrayOopDesc::max_array_length(); the prior version did not use MinObjAlignment and was off by 2.