add buffer.c

Signed-off-by: yuzhohngqiang <yu_zhongqiang@pactera.com>