iobuf: extract ibuf/obuf into src/lib/small, add unit tests
Refactor iobuf and extract ibuf/obuf into small allocators library. Fix leaking obuf_destroy() (some slabs could be leaked by destroy). Introduce rename to follow the style of small allocators library.
Showing
- src/box/iproto.cc 8 additions, 8 deletionssrc/box/iproto.cc
- src/box/iproto_port.cc 1 addition, 1 deletionsrc/box/iproto_port.cc
- src/box/replica.cc 2 additions, 2 deletionssrc/box/replica.cc
- src/iobuf.cc 3 additions, 282 deletionssrc/iobuf.cc
- src/iobuf.h 3 additions, 303 deletionssrc/iobuf.h
- src/lib/small/CMakeLists.txt 9 additions, 1 deletionsrc/lib/small/CMakeLists.txt
- src/lib/small/ibuf.c 104 additions, 0 deletionssrc/lib/small/ibuf.c
- src/lib/small/ibuf.h 162 additions, 0 deletionssrc/lib/small/ibuf.h
- src/lib/small/obuf.c 211 additions, 0 deletionssrc/lib/small/obuf.c
- src/lib/small/obuf.h 269 additions, 0 deletionssrc/lib/small/obuf.h
- src/lib/small/slab_cache.h 6 additions, 0 deletionssrc/lib/small/slab_cache.h
- src/lua/buffer.lua 17 additions, 13 deletionssrc/lua/buffer.lua
- test/unit/CMakeLists.txt 4 additions, 0 deletionstest/unit/CMakeLists.txt
- test/unit/ibuf.c 50 additions, 0 deletionstest/unit/ibuf.c
- test/unit/ibuf.result 3 additions, 0 deletionstest/unit/ibuf.result
- test/unit/obuf.c 82 additions, 0 deletionstest/unit/obuf.c
- test/unit/obuf.result 3 additions, 0 deletionstest/unit/obuf.result
Loading
Please register or sign in to comment