when i use preprocessor #if 0 ... #endif to cross out a bunch of sentences, then after building the target. I noticed the "data" memory usage increased, why? There is no error in the result.
There is no error in the result. Unless you turned down the linker warning levels from its default (maximum), there should still have been some L16 warnings, though, about uncalled segments. Those would be the root of your problem: you commented out all calls to some functions, but not the functions themselves.