4.2 dev

Update 4.2-dev changes to Master. Includes fix for linking problems with get_weighted_memory_size