Question about apps and use of memory

I'm thinking about getting the HTC Hero, and I have a few questions about apps and storage space on the phone.

First of all, how much of the internal memory can be used for installing apps? Can you use the entire 512MB or just 256?

Secondly, how much space does an installed app take on the memory, on average?