当前位置:网站首页>Go deep into the underlying C source code and explain the core design principles of redis
Go deep into the underlying C source code and explain the core design principles of redis
2022-07-05 18:58:00 【bingtanghulu_ six】
Catalog
1.redis Basic characteristics
2.redis Application scenarios
3. data structure
3.1 string
redis All of them are k-v structure ,key At the bottom, it's all string structure ,value Yes string,hash,set,sorted set,list etc. .
among string The data structure in is as follows ,3.2 Previously, there were only three parameters len( Character length ),free( Free space ),buf[]( Storage variable )
redis in string Three characteristics of strings
1. Binary secure data structures
c Language in string str='xxx\0'; The structure of string is represented by a \0 For the end .
2. Provides a memory pre allocation mechanism , Avoid frequent memory allocation
Provide capacity expansion mechanism , Algorithm :(len+addlen)*2
3. compatible C Language function library .
bitmap Bottom use string,string The maximum length that a string can represent 512M.
The following figure shows the statistics of weekly live users
边栏推荐
- 进程间通信(IPC):共享内存
- 解决 contents have differences only in line separators
- 【Autosar 十四 启动流程详解】
- The road of enterprise digital transformation starts from here
- Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
- Ant group open source trusted privacy computing framework "argot": open and universal
- Is it safe to make fund fixed investment on access letter?
- Isprs2020/ cloud detection: transferring deep learning models for cloud detection between landsat-8 and proba-v
- Oracle日期格式转换 to_date,to_char,to_timetamp 相互转换
- 国内低代码开发平台靠谱的都有哪些?
猜你喜欢
How to quickly advance automated testing? Listen to the personal feelings of the three bat test engineers
RedHat7.4配置yum软件仓库(RHEL7.4)
一朵云开启智慧交通新未来
技术分享 | 常见接口协议解析
集合处理的利器
SAP 特征 特性 说明
IDEA配置npm启动
案例分享|金融业数据运营运维一体化建设
You can have both fish and bear's paw! Sky wing cloud elastic bare metal is attractive!
2022 the most complete Tencent background automation testing and continuous deployment practice in the whole network [10000 words]
随机推荐
Reptile 01 basic principles of reptile
常见时间复杂度
CDB 实例的启动与关闭
AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources
R语言可视化散点图(scatter plot)图、为图中的部分数据点添加标签、始终显示所有标签,即使它们有太多重叠、ggrepel包来帮忙
R language Visual scatter plot graph, add labels to some data points in the graph, and always display all labels, even if they have too much overlap. Ggrep package helps
7-2 保持链表有序
c期末复习
瞅一瞅JUC提供的限流工具Semaphore
2022最新Android面试笔试,一个安卓程序员的面试心得
RPC protocol details
Postman核心功能解析 —— 参数化和测试报告
IDEA配置npm启动
为什么 BI 软件都搞不定关联分析?带你分析分析
跨境支付平台 XTransfer 的低代码实践:如何与其他中台融合是核心
2022最新大厂Android面试真题解析,Android开发必会技术
进程间通信(IPC):共享内存
小程序 修改样式 ( placeholder、checkbox的样式)
2022年阿里Android高级面试题分享,2022阿里手淘Android面试题目
技术分享 | 接口测试价值与体系