That's an interesting question. Doesn't the iPhone have only one memory type? It's all flash memory that can be mapped for storage or "RAM" type usage. There must be a portion reserved for "RAM", otherwise you could overload with songs and data to the point the phone wouldn't boot, but I'd think that otherwise you could map as much for your needs as OS X (lite) would allow.
The iPhone (and iPod touch) has, I believe, 128MB ram in addition to the flash memory (you can't use flash memory in place of RAM, except perhaps for virtual memory as you would a hard disk). Running out of memory is what causes most App crashes, so letting apps run in the background would definitely make things worse.