当前位置:网站首页>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
边栏推荐
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- Applet modification style (placeholder, checkbox style)
- R语言使用lubridate包处理日期和时间数据实战
- Rse2020/ cloud detection: accurate cloud detection of high-resolution remote sensing images based on weak supervision and deep learning
- 华律网牵手观测云,上线系统全链路可观测平台
- 尚硅谷尚优选项目教程发布
- Idea configuring NPM startup
- Chinese postman? Really powerful!
- All you want to know about clothing ERP is here
- Is it complicated to open an account? Is online account opening safe?
猜你喜欢
How to quickly advance automated testing? Listen to the personal feelings of the three bat test engineers
Web3.0时代来了,看天翼云存储资源盘活系统如何赋能新基建(下)
The main thread anr exception is caused by too many binder development threads
How to automatically install pythn third-party libraries
Take a look at semaphore, the current limiting tool provided by JUC
The road of enterprise digital transformation starts from here
Why can't Bi software do correlation analysis? Take you to analyze
android中常见的面试题,2022金九银十Android大厂面试题来袭
2022最新Android面试笔试,一个安卓程序员的面试心得
Interprocess communication (IPC): shared memory
随机推荐
The era of Web3.0 is coming. See how Tianyi cloud storage resources revitalize the system to enable new infrastructure (Part 2)
Redhat7.4 configure Yum software warehouse (rhel7.4)
Powerful tool for collection processing
R language uses lubridate package to process date and time data
Solutions contents have differences only in line separators
Analysis of postman core functions - parameterization and test report
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
2022全网最全的腾讯后台自动化测试与持续部署实践【万字长文】
A2L file parsing based on CAN bus (3)
Precautions for RTD temperature measurement of max31865 module
AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources
C final review
Quickly generate IPA package
技术分享 | 常见接口协议解析
Oracle Chinese sorting Oracle Chinese field sorting
小程序 修改样式 ( placeholder、checkbox的样式)
Tupu software digital twin smart wind power system
Tianyi cloud understands enterprise level data security in this way
图扑软件数字孪生智慧风电系统
Deep copy and shallow copy [interview question 3]