文章目录
  1. 1. TCP
  2. 2. Memory
  3. 3. DS
  4. 4. Algorithm
  5. 5. 表达
  6. 6. 名词:

BIRTH OF THE MODERN CONFERENCE ,YALTA,1945

Understanding C by learning assembly

TCP

ISN: Initial Sequence Number

Memory

  • fragmented :碎片; memory fragmented

DS

  • a hierarchical data structure:分层数据结构

  • unary-expression 一元表达式

    unary operator 一元运算符

Types of unary operators:

1
2
3
4
5
6
unary minus(-)
increment(++)
decrement(- -)
NOT(!)
Addressof operator(&)
sizeof()
  • Memory Alignment:内存对齐

    Alignment:校准 ,对齐

  • vertex:定点 /node节点

  • edge:边

  • rooted tree:有根树
  • ordered binary tree:有序二叉树

  • proper binary tree:真二叉树( 不含一度节的二叉树)

  • mnemonic :(反汇编)助记符

  • displacement:偏移量

hash:

  • n_count #号
    A line starting with # serves as a comment. Put a backslash (“") in front of the first hash for patterns that begin with a hash. ( 一行开头#是注释。 \放在#号前面就是 就是#号 ) docs/gitignore

word: 计算机进行数据处理时,一次存取、加工和传送的数据长度称为字(word)。一个字通常由一个或多个(一般是字节的整数位)字节构成.
字是word 长度与架构有关,如mips包括32个二进制位
一个字就是4个字节
它们的区别就是长度不一样。

例如286微机的字由2个字节组成,它的字长为16;486微机的字由4个字节组成,它的字长为32位机。 计算机的字长决定了其CPU一次操作处理实际位数的多少,由此可见计算机的字长越大,其性能越优越。

semi-linear structure

半线性结构:

caller/callee:调用者/

Character Encoding

字符编码

Amercian Standar Code for Information Interchange

ASCII码

Non-printable Character

不可见字符

Whitespace

空白字符

Integer Type

简称整形。指:char型和int型

Postfix operator

后缀运算符

Function Designator

函数名

Side Effect

副作用

Generalize

泛化

Pound Sign,Number,Hash Sign

#号

Angle Bracket

尖括号

prototype

原型

Procedure

过程:指没有返回值函数

Rule of Least Surprise

最少例外原则

Comma

Rationale

原因,原理:原理的阐述

Parameter

形参

Argument

实参

Constant Expression

常量表达式

increment

增加

viNecessary Condition

必要条件

Sufficient Condition

充分条件

function prototype

函数原型

Control FLow

控制流程

Branch

分支

Statement BLock

语句块:指由{}括起来的若干条语句或声明组成的语句块

Clause

子句

Modulo

取模:%

Remainder

余数

Parity

奇偶性;

even:偶数

odd:基数

Dangling-else

空悬else

primitive Type

基本类型

Data Abstraction

数据抽象

Procedure Abstraction

过程抽象

Arithmetic Type

算术类型

Scalar Type

标量类型

implicit conversion

隐式转换

explicit conversion

显示转换

redirection

重定向

Algorithm

union find

并查集(算法)

dynamic connectivity

动态连通

iterate

迭代

Sparse

稀疏

gcd

greatest common divisor:最大公约数

nonnegative integers

非负整数

remainder

余数

RC版本

Release Candiate发布候选版。

DRAM

Dynamic Random Access Memory动态随机存储器

系统内存

PCI

Peripheral Component Interconnect外设不见互连标准

它是目前个人电脑中使用最广泛的接口

precision

精确,精密

C++函数setprecision()

filter

过滤器

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* This file contains code from "C++ Primer, Fifth Edition", by Stanley B.
* Lippman, Josee Lajoie, and Barbara E. Moo, and is covered under the
* copyright and warranty notices given in that book:
*
* "Copyright (c) 2013 by Objectwrite, Inc., Josee Lajoie, and Barbara E. Moo."
*
*
* "The authors and publisher have taken care in the preparation of this book,
* but make no expressed or implied warranty of any kind and assume no
* responsibility for errors or omissions. No liability is assumed for
* incidental or consequential damages in connection with or arising out of the
* use of the information or programs contained herein."
*
* Permission is granted for this code to be used for educational purposes in
* association with the book, given proper citation if and when posted or
* reproduced.Any commercial use of this code requires the explicit written
* permission of the publisher, Addison-Wesley Professional, a division of
* Pearson Education, Inc. Send your request for permission, stating clearly
* what code you would like to use, and in what specific way, to the following
* address:
*
* Pearson Education, Inc.
* Rights and Permissions Department
* One Lake Street
* Upper Saddle River, NJ 07458
* Fax: (201) 236-3290
*/

《C++ Primer5th》实例代码开头声明

  • Inc=incorporated有限公司的缩写

  • warranty: 保证

  • incidental:附带

  • consequential damages 重大损坏

  • arise:发生

  • liability:负担

  • proper:引用

表达

  • parenthesize:加上括号

  • cclarification: 澄清

  • operand/operator: 操作数/操作符

1
2
3
 int a = 10;
int b = -a; // b = -10
unary minus is different from subtraction operator, as subtraction requires two operands.

unary minus:一元减号;

  • must be parenthesized:加上括号

    1
    2
    3
    4
    5
    6
    That's the way the language is specified, type names must be parenthesized here.

    Suppose the grammar looked like this:

    sizeof unary-expression
    sizeof type-name
  • Expressions:表达式

Expressions are sequences of operators, operands, and punctuators that specify a
computation. The evaluation of expressions is based on the operators that the
expressions contain and the context in which they are used. An expression can
result in a value and can produce side effects. A side effect is a change in the state
of the execution environment

Operators And Punctuators: 操作符与标点符号

名词:

  1. expression(表达式):一个表达式产生一个计算结果,它由一个或多个对象和一个运算符(通常是)组成;
  • Reference 引用

  • 语句块block

就是用花括号包围的零条或多条语句的序列。语句块就是语句的一种,任何要求使用语句块的地方都可以使用语句块。

  • 成员函数(member function)
    成员函数是定义类的一部分函数,有时也被称为方法(method)

  • 点运算符(.)
    点运算只能用于类类型的对象,右侧运算对象必须是该类型的一个成员函数名,运算结果为右侧运算对象指定的成员。

  • 字面值常量(literal)

每个字面值常量对应一种数据类型,字面值常量的形式和值距诶的那个了它的数据类型。

  1. 声明符(declarator)

    p45
    声明符就是变量名;

  2. arithmetic conversion算数转换

  3. integral promotion整型提升

  4. STL是Standard Template Library的简称,中文名标准模板库

  5. RTTI(Run Time Type Identification))即通过运行时类型识别,程序能够使用基类的指针或引用来检查着这些指针或引用所指的对象的实际派生类型。

    C++中的RTTI机制解析

为什么会出现RTTI这一机制,这和C++语言本身有关系。和很多其他语言一样,C++是一种静态类型语言。其数据类型是在编译期就确定的,不能在运行时更改。然而由于面向对象程序设计中多态性的要求,C++中的指针或引用(Reference)本身的类型,可能与它实际代表(指向或引用)的类型并不一致。有时我们需要将一个多态指针转换为其实际指向对象的类型,就需要知道运行时的类型信息,这就产生了运行时类型识别的要求。和Java相比,C++要想获得运行时类型信息,只能通过RTTI机制,并且C++最终生成的代码是直接与机器相关的。

  1. 声明与定义

  2. 动态绑定(dynamic binding )

    c++primer15.1节P527

  3. jump table(跳转表):是一个数组;

    《CSA:PP》(中文)P144(3.6.7)

  4. exception:异常

  5. Stack/ Stack Frame
    栈帧(Stack Frame)

栈:
在数据结构中, 栈是限定仅在表尾进行插入或删除操作的线性表。栈是一种数据结构,它按照后进先出的原则存储数据,先进入的数据被压入栈底,最后的数据在栈顶,需要读数据的时候从栈顶开始弹出数据。

在计算机系统中,栈也可以称之为栈内存是一个具有动态内存区域,存储函数内部(包括main函数)的局部变量和方法调用和函数参数值,是由系统自动分配的,一般速度较快;存储地址是连续且存在有限栈容量,会出现溢出现象程序可以将数据压入栈中,也可以将数据从栈顶弹出。压栈操作使得栈增大,而弹出操作使栈减小。
栈用于维护函数调用的上下文,离开了栈函数调用就没法实现。

  • 栈帧(Stack Frame)

而什么是栈帧(Stack Frame)呢? 每一次函数的调用,都会在调用栈(call stack)上维护一个独立的栈帧(stack frame).每个独立的栈帧一般包括:

  • 函数的返回地址和参数
  • 临时变量: 包括函数的非静态局部变量以及编译器自动生成的其他临时变量
  • 函数调用的上下文
    栈是从高地址向低地址延伸,一个函数的栈帧用ebp 和 esp 这两个寄存器来划定范围.ebp 指向当前的栈帧的底部,esp 始终指向栈帧的顶部;
    ebp 寄存器又被称为帧指针(Frame Pointer);
    esp 寄存器又被称为栈指针(Stack Pointer);
文章目录
  1. 1. TCP
  2. 2. Memory
  3. 3. DS
  4. 4. Algorithm
  5. 5. 表达
  6. 6. 名词: