+minPayloadSize :: SMRep -> Bool -> WordOff
+minPayloadSize smrep updatable
+ = case smrep of
+ BlackHoleRep -> min_upd_size
+ GenericRep _ _ _ _ | updatable -> min_upd_size
+ GenericRep True _ _ _ -> 0 -- static
+ GenericRep False _ _ _ -> mIN_SIZE_NonUpdHeapObject
+ -- ^^^^^___ dynamic
+ where
+ min_upd_size
+ | opt_SMP = ASSERT(mIN_SIZE_NonUpdHeapObject <=
+ sIZEOF_StgSMPThunkHeader)
+ 0 -- check that we already have enough
+ -- room for mIN_SIZE_NonUpdHeapObject,
+ -- due to the extra header word in SMP
+ | otherwise = mIN_UPD_SIZE