The tacho pulse comes straight from the ballast resistor (the same lead that goes to your in-car gauges) and there is 2 ignition pulses per revolution in a 4 cylinder motor (3 in a 6 cylinder, 4 in an 8, etc)
You want to redo your maths then!
At 6000rpm, the ignition pulse is running at 200Hz, not 50Hz.
6000RPM = 100 rev/sec -> 100 x 2 sparks per rev = 200 sparks per second = 200Hz.
Also, if the signal comes from the Low Tension side of the coil (aka switching/ballast resistor side), then you need to allow for the back emf spike everytime the coil is fired, which can be in the low hundred of volts range, and very capable of frying silicon. You also want some isolation incase of flashover on the coil due to dampness.
The ECU does most of the ground work, converting inputs to values, calculating the pulse length and correcting it to get the desired air/fuel mixture... The calculation is at 4700 bytes (but that bit of code needs cleaning up)... Im sure I can fit everything I need to into the nano, if not, ill upgrade to the mega but i am storing everything i can in the smallest memory i can.. For example, the Air/Fuel ratio (being 13.0 to 20.0) will be stored as a byte (0 to 255) and then divided by 10 in the code (to get 00.0 to 25.5) etc...
Where possible, avoid using floats. Just because the ratio looks nice to humans, doesn't mean you have to keep it as a ratio in the code. In the code, simply have an integer scale which will use less processing time and memory.
Also, the basic map should be that, basic. On modern ECUs the basic map is enough to ensure the engine starts and runs reasonably well, and sets output limits (i.e. maximum fuel at x revs, spark timing...), and then using inputs from various sensors, the ECU applies trims to that map to get the best performance, which are stored at shutdown.
SO.. as a guess... memory allocation is as follows (out of 30k)...
My Code: 15k
MAP table (10x20 values = 200 values, but stored as bytes) = 0.2k
SD card library = 1k
So the estimated is about 17k... which still leaves more than enough memory to add more stuff..
Were you using the ATmega128 (which has 12K of memory total)
It was an Uno I was using, which uses the Atmega328P, and it was SRAM I ran out of.
The first you'll know you've ran out of SRAM is when it locks up, or does weird things.