4MB of RAM?

Possible?

Yes, if you don't mind it paged. It will not be part of the processors memory map, that means you can't use it to store every day variables in it but you can have special routines to put stuff in and out.

And you will have to design the interface circuit, probable lots of shift registers for address / data.

I need to store a string that can be up to 2 MB long, not mandatory to be in RAM but has to be fast.

You might look into SD chip reader/writer for Arduino.

I suspect that as you are asking again you don't know what is involved in designing a 2M paging memory, so it is probably a bit too advanced for you.

Per Grumpy Mike's suggestion, here's an example of somebody doing what you want:

http://www.radiolocman.com/shem/schematics.html?di=109611

Good luck!

I already read that, but can I add 3 more pins for 4MB of SRAM?

Sure. One option would be to run the 3 IO pins out to a demultiplexer like a 74ahc138, have those outputs control / select 8 different banks of 512K RAM, then use the rest of the author's plans.

can I add 3 more pins for 4MB of SRAM?

Well not just 3 pins, you can have 4 of these boards and use two pins to enable just one board at a time.

Yes, that's what I think I mean. I saw that table with binary numbers (I love those), can I add 3 more bits to those?

Not sure where you get 3 more bits from, you will only need 2 to get 4 times the memory, with 3 you will get 8 times the memory with 8 memory cards or equivalent.

512KB * 8 = 4MB don't I need 3 more bits?

Yes but you said:-

I need to store a string that can be up to 2 MB long,

Yes, but I really doubt that all the code needed to parse all that data will fit in 8KB. Also, that page says that out of 512KB, you lose approx. 60KB or something like that.

but I really doubt that all the code needed to parse all that data will fit in 8KB

This doesn't give you any extra code space.

I still need it <3

bogdacutu: I still need it

Then Arduino may not be the platform for you. The program space is pretty fixed. You get 256K (less bootloader) for your program in a mega, and if it doesn't fit, you'll need to move to a different architecture.

If you have to mess with 2MB strings in memory, I thing you'll want a 32-bit architecture like a marvell plug-computer or a gumstix or something along those lines.

Why don't you start with explaining where this 2Mb string is coming from, and what you expect to do with it once you have received it. Shuffling it off onto external storage, of any kind, is likely to be the least of your problems.

I need to store a string that can be up to 2 MB long

This may be the longest string ever.

but I really doubt that all the code needed to parse all that data will fit in 8KB

8KB of code in Arduino world is pretty huge. One can do a lot of (C) string parsing in 8KB.

SD card will hold it easily and work at SPI bus speed which is fast. Serial RAM would be the same speed and require many 32Kbyte chips to do the same basic thing.