optimize memory consumption
add debug info
code style
Merge pull request #5 from cfsego/upstream_no_buf

optimize memory consumption