Not sure there is a way to list the contents, you just have to go to each item and view it's properties I think.
However, I am pretty certain you don't get the full 40GB out of the box. You will lose some through the file system, plus some may be reserved for system use.
Not played the PS3 version of GTAIV, so not sure how much it takes up.