通过位操作简洁的写KB,MB,GB By Dawei XU Published Nov 19 2012 Contents 1 << 10 = KB, 1 << 20 = MB, 1 << 30 = GB … 所以如果想开一个2KB的buffer,可以写2<<10,比较简洁。