tbox v1.5.1 Release Notes
Release Date: 2016-01-15 // over 8 years ago-
🆕 New features
- ➕ Add automaticlly check libc interfaces
- 👌 Support custom allocator
- ➕ Add trace for allocator in the debug mode
- ➕ Add
static_pool
module - ➕ Add stream interfaces for reading all data to string
- ➕ Add adler32 hash algorithm
- ➕ Add
tb_memmem
interface - ➕ Add regex module with pcre, pcre2 or posix regex
🔄 Changes
- ⚡️ Optimize stream and support read/write character device file
- 👍 Modify
tb_init
api and support allocator arguments - 👌 Improve memory manager and use the allocator mode
- Redefine
assert
and will abort for debug mode
🐛 Bugs fixed
- 🛠 Fix some bugs for android
- 🛠 Fix seek bug for stream
新特性
- 自动检测所有系统libc接口,优先使用系统版本
- 支持自定义内存分配器,并且能够在debug模式下,获取每次分配的代码位置信息,用于自定义追踪
- 增加轻量级
static_pool
来维护整块buffer的内存分配,适合局部管理部分内存,pool虽然也能维护,但是底层基于large_pool
,比较重量级,适合全局管理内存 - 增加stream快速读取全部数据到string的接口
- 增加adler32 hash算法
- 增加
tb_memmem
接口 - 采用pcre/pcre2/posix regex实现正则表达式库
改进
- 优化stream,支持对字符设备文件的读写
- 修改
tb_init
接口,增加allocator自定义内存分配器参数,实现用户的侵入式内存管理 - 重构内存管理,完全采用分配器allocator模式,可以灵活切换内存管理,支持原生系统内存、静态buffer内存、内存池等各种分配方式
- 重定义assert,debug模式遇到assert直接abort执行
🐛 Bugs修复
- 修复android下的一些bug
- 👀 修复stream的seek问题