plz help with memory size

I wrote something like "byte data[2048];" for a atmega328 board and the compiler didn't see any wrong with it.

The compiler does not know of the physical limits of the board.

is it possible to estimate memory usage of a sketch?

Yes. But we haven't seen your sketch.