The original iPhone and iPhone 3G contained 128MB of RAM. The iPhone 3GS has 256MB of RAM. Also, the iPad contains 256MB of RAM. A new iPhone 4 confirmed to have 512MB of RAM, it is twice the iPad and iPhone 3GS.
512MB of RAM will help performance and multi-tasking on the new iPhone 4.