当前位置:网站首页>[proficient in high concurrency] deeply understand the basis of C language and C language under assembly
[proficient in high concurrency] deeply understand the basis of C language and C language under assembly
2022-06-25 16:43:00 【Hua Weiyun】
Author's brief introduction : Xiaoming Java Asking the way , Senior R & D Engineer of a large financial Internet company , Good at orders / High security in the trading field / You can use / Concurrent / Performance architecture design and implementation , Focus on the research of computer and financial technology
If this article is good , Please pay attention. 、 give the thumbs-up 、 Collect three companies to support bloggers
Introduction to this article :C The basic part of language does not need to be repeated , Mainly explain the structure 、 Pointer and array principle , And analyze the C Language .Liunx Kernel and JNI It's all through C To write , This part mainly explains the idea of executing programs by operating pointers and memory , For the follow-up Hotspot and java Of api It is very important to understand .
Two 、C Language foundation
1. Structural applications
You have to use struct sentence ,struct Statement defines a data type that contains multiple members
2. Look at the structure from the assembly point of view
From this simple code analysis ,name and age Address difference 8 Bytes , Finishing is a plastic surgery 4 Bytes +4 Bytes filled , We disassemble it , Look at the implementation of assembly code .
Each variable will have a memory address , Every memory address can be used & visit , He represents the address in memory . First, define a concept , A pointer is a variable , Its value is the address of another variable ( Direct address of memory location ), All use must be declared first .
The code after disassembling the above code , The author is 64 Bit system
5. Some basic applications of pointers
Accessing arrays through pointers , Arrays are continuous spaces , The pointer stores the address of the corresponding data , When declaring an array, it is the address of the first element in the newly opened continuous address space by default , Use var[index] Equivalent to our direct manipulation of pointers * Get elements by reference ;
Pointer array is to save the element address ( The pointer ) Array of
边栏推荐
- The problem of missing precision of kettle table input components
- Read mysql45 the next day
- Blue Bridge Cup - practice system login
- Beginner bug set
- Optimization of lazyagg query rewriting in parsing data warehouse
- Function and implementation of closures
- About: encryption and decryption of rsa+aes data transmission [chapter], project practice (special summary)
- When inputting text in the shutter textfield, if the page is refreshed, the cursor position will change.
- Coredata data persistence
- Day_ 18 hash table, generic
猜你喜欢
mysql整体架构和语句的执行流程
Learning notes of rxjs takeuntil operator
从业一年,我是如何涨薪13K+?
Unity技术手册 - 生命周期内大小(Size over Lifetime)和速度决定大小(Size by Speed)
Resolve the format conflict between formatted document and eslint
Day_ twelve
使用PyWebIO测试,刚入门的测试员也能做出自己的测试工具
【蓝桥杯集训100题】scratch指令移动 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第14题
【NLP】今年英语高考,CMU用重构预训练交出134高分,大幅超越GPT3
Day_ 05
随机推荐
Simple dialogue system -- implement transformer by yourself
Dino: Detr with improved detecting anchor boxes for end to end object detection
Day_ 05
The third day of mysql45
Nsurlsession learning notes (III) download task
Reverse series to obtain any wechat applet code
【 apprentissage automatique】 cas de prévision et d'analyse de l'examen d'entrée à l'Université basé sur des séries chronologiques multiples
論文筆記:LBCF: A Large-Scale Budget-Constrained Causal Forest Algorithm
Alvaria announces Jeff cotten, a veteran of the customer experience industry, as its new CEO
Reading mysql45 lecture - index continued
Xinlou: Huawei's seven-year building journey of sports health
Unity技术手册 - 生命周期内大小(Size over Lifetime)和速度决定大小(Size by Speed)
加密潮流:时尚向元宇宙的进阶
Record learning of hystrix knowledge --20210929
使用PyWebIO测试,刚入门的测试员也能做出自己的测试工具
10款超牛Vim插件,爱不释手了
Day_ 18 hash table, generic
【效率】又一款笔记神器开源了!
Data type variable operator
A TDD example