max buffer size for atmega328

Good day! I tried to compile a program that uses an ethernet shield. I successfully upload the program on an atmega328 chip but the program is not running perfectly. But when I tried to run it on an Arduino Mega 1280, it works perfectly. I think a have a problem with the max buffer size.

I have no ethernet shield so even if I had your code it would do me no good helping though others might be able to use the code (hint, post your code inside code tags, the editor # button makes a set).

However, here is a function that you might find useful. If you quote-reply to this post, you will see code tags.

int freeRam () {
  extern int __heap_start, *__brkval; 
  int v; 
  return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval); 
}

jason2015:
Good day! I tried to compile a program that uses an ethernet shield. I successfully upload the program on an atmega328 chip but the program is not running perfectly. But when I tried to run it on an Arduino Mega 1280, it works perfectly. I think a have a problem with the max buffer size.

So you have tried making the buffer smaller to prove your theory?

I think a have a problem with the max buffer size.

The maximum size of what buffer?