How to deal with memory issu?

I'm have some problems of handling memory issue.

I establish ethernet connection with sever and keep receiving data and run actions and reply the data.

I receive the command from serve as one static String or char pointer.

After receiving some data, it just hangs.

I think that is because of memory problem.

any one has some ideas?

I wish I could help... but I'm in a middle of a storm and my deductive mental powers are weakened by it. Because of that I cannot see your code and understand what is going wrong. On the other hand, if you could post some code, things would be a bit easier.

Until then, let's hope the storm goes away fast!

It’s easy to check the memory, just include:

#include <MemoryFree.h> //somewhere at the top of the file

and then print it so you can check what’s going on.

Serial.println(freeMemory());

You can sprinkle these prints around to see what memory is being used. Try to have 200 bytes free or you will run into random problems because of subroutine calls, temporary variables and other stack usage. If you don’t already have the memoryfree library, it’s on the arduino playground, google for it.