当前位置:网站首页>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
边栏推荐
- Windows Oracle 开启远程连接 Windows Server Oracle 开启远程连接
- Interprocess communication (IPC): shared memory
- [HCIA cloud] [1] definition of cloud computing, what is cloud computing, architecture and technical description of cloud computing, Huawei cloud computing products, and description of Huawei memory DD
- [detailed explanation of AUTOSAR 14 startup process]
- cf:B. Almost Ternary Matrix【对称 + 找规律 + 构造 + 我是构造垃圾】
- Share: ZTE Yuanhang 30 Pro root unlock BL magick ZTE 7532n 8040n 9041n brush mask original brush package root method Download
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- 输油管的布置数学建模matlab,输油管布置的数学模型
- 图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
- Word查找红色文字 Word查找颜色字体 Word查找突出格式文本
猜你喜欢

IDEA配置npm启动

视频自监督学习综述

Analysis of postman core functions - parameterization and test report

自动化测试的好处

Tianyi cloud understands enterprise level data security in this way

瞅一瞅JUC提供的限流工具Semaphore

Use QT to traverse JSON documents and search sub objects

Icml2022 | partial and asymmetric comparative learning of out of distribution detection in long tail recognition

SAP 特征 特性 说明

2022最新大厂Android面试真题解析,Android开发必会技术
随机推荐
紧固件行业供应商绩效考核繁琐?选对工具才能轻松逆袭!
R language uses lubridate package to process date and time data
在通达信上做基金定投安全吗?
Isprs2020/ cloud detection: transferring deep learning models for cloud detection between landsat-8 and proba-v
达梦数据库udf实现
Isprs2022/ cloud detection: cloud detection with boundary nets
常见时间复杂度
Take a look at semaphore, the current limiting tool provided by JUC
U-Net: Convolutional Networks for Biomedical Images Segmentation
7-2 keep the linked list in order
Chinese postman? Really powerful!
集合处理的利器
vs2017 qt的各种坑
2022 latest Android interview written examination, an Android programmer's interview experience
Insufficient picture data? I made a free image enhancement software
Low code practice of xtransfer, a cross-border payment platform: how to integrate with other medium-sized platforms is the core
2022年5月腾讯云开发者社区视频月度榜单公布
android中常见的面试题,2022金九银十Android大厂面试题来袭
Is it safe to make fund fixed investment on access letter?
5. Data access - entityframework integration