Serial buffer size problem

I sent bytes to Arduino through serial port. Sometimes, the data sent could be over 256 bytes, such as 2000 bytes, at a time.

My solution is to increase buffer size by modifing the HardwareSerial.cpp file. After I changed the buffer size to 256 or higher number, such as 1024, Arduino has a msg popup during startup. This popup window transiently open and close. I don't know what it says. And other problem after this modification is that the serial communication was down.

Does anyone has the same problem? I am using Mac OS. thanks

The Atmega 1284 has 16K ram maybe you should look at using it.
Bobs version of the Ardweeny using a 1284 might be a good choice or his Bobuino2.

The 328 based Arduinos have 2048 bytes of SRAM. How do you propose to store two 1024 byte arrays in that memory and have any memory left for anything, like the stack?

Increasing the serial buffer size is NOT the answer. The Arduino can read data orders of magnitude faster than it can receive data, unless you are doing something stupid, like using delay().

Without seeing your code, or having a clue why you are sending novels to the Arduino, all we can do is wish you luck.