Dry Socket vs Normal Socket - Surya Dental CareMihikaVasant
?
Dry socket is a painful dental condition that occurs after wisdom tooth extraction due to dislodge of blood clot. It should be treated or else it gets worse. FOR MORE INFO VISIT:https://www.suryadentalcare.com/dry-socket-vs-normal-socket-symptoms-causes-and-treatments/
Mechanical Behavior & Testing of Materials.pptxARJUNRAJAS1
?
This Presentation help you to understand the basic concepts of the mechanical behavior of materials. Besides, it also contains some information about stress strain curves and hardness testing.
My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
Control Flow Statements
Last Week Homework "Stack" Solution
Function pointer (ʽָ)
Static Class Members (oBeɆT)
Constructor & Destructor (c☋)
Class Templates (eӰ)
Check out my blog : https://oalieno.github.io/2019/06/07/security/pwn/rootkit/
Introduction and implementation of rootkit. Targeting linux kernel 5.x.x.
My inspiration from reading *C++ Primer*, *Effective C++*, *More Effective C++*, *The C++ Standard Library* and some experience from coding.
Include:
* Debug
* C++ Syntax
* Habit && Optimization
* Trick
* Trap
* Reference
Control Flow Statements
Last Week Homework "Stack" Solution
Function pointer (ʽָ)
Static Class Members (oBeɆT)
Constructor & Destructor (c☋)
Class Templates (eӰ)
Check out my blog : https://oalieno.github.io/2019/06/07/security/pwn/rootkit/
Introduction and implementation of rootkit. Targeting linux kernel 5.x.x.
6. ȫ׃ singleton aĆ}
? Ĵ_̈́eһ?
// lib1.c // lib2.c
unsigned int a; char a;
// main.c
extern a; l?
[user@locahost]$ gcc Cc ./lib1.c && gcc Cc ./lib2.c && gcc Cc ./main.c
[user@locahost]$ gcc ./lib1.o ./lib2.o ./main.o
7. Linker symbol
? Linker Ѓɂ rules symbol
C ܴڃɂ̖
C ̖ > ̖
C g > Сg
? gcc C compiler
C гʼֵ global variable 鏊̖
C ]гʼֵ global variable ̖ COMMON variable̎
// lib1.c // lib2.c
unsigned int a; char a;
// main.c
extern a; unsigned int
17. See Again C Meyers Singleton
class Board
{
public:
static Board* self() {
static Board Instance;
return &Instance;
}
private:
Board();
~Board();
Board( const Board& );
Board& operator=( const Board& );
};
18. Compiler Static local variable
? normal local variable Q auto-variable
stack or register
C ͨ compiler optimization
C Debugger exception handling Ҫ~
compensation code ߀ԭ auto-variable
? Static local variable data/bss section
C r² compiler optimization
C gcc
C ӛwg̶
20. Variable = storage type + Duration
? C++ Storage
C Static storage
? static member variable
C Automatic storage
? Auto, register NOT static, extern
C Dynamic storage
? new
? Storage Duration
C Automatic duration
? register auto ׃ scope
C Dynamic duration
? new _ʼdelete Y
C Static duration
? ijʽ_ʼY
21. Static storage initialization ĕrC
? standard f:
? Static storage initialization _ʼ֮ǰҪ zero initialization
? Non-local variableՓκ storage typeStatic initialization Ҫ dynamic
initialization ֮ǰ
? Zero initialization
? Initialization with constant expression
? Local static variable initialization ^}s
C S compiler Լ implementation
1. namespace scope _ʼr initialization
2. first time control passes through the declaration _ʼræ initialize
? GCC Compiler @:
C Static storage ֵ[ .data
C Static storage ]ֵ[ .bss
C Local static POD (C data type) 1
C local static variable 2
22. See Again C Meyers Singleton
class Board
{
public:
static Board* self() {
static Board Instance();
; Ŀǰ gcc o^
return &Instance;
}
private:
Board();
~Board();
Board( const Board& );
Board& operator=( const Board& );
};
23. } C Dead Reference Problem
? ϵyYrOӋ singleton
пܱܶΣ segmentation
fault
24. Dead Reference Problem
?
C singleton C Board, Game, Log
C κ singleton l}͕Yϵy
C destructor
? Log::self()->printf( Dead Mesg );
? Clean up member variables
33. Y
? Placement Operator new()
C Z
new(address) class_name();
C x
1. address cһ class_name
2. ȥ] atexit
? atexit
C Z
int atexit( void (*pFun)() );
C x
]ԽYrԓһ function, FILO stack
39. Singleton ӷ
? c
C áÌ
C global variable ܶలȫ
? ȱc
C ̫ãӛ䚧PSϵy
? ͵! ҪҎcPS
ܛQҪҪʹ singleton
? ͨҎ֮ᣬsingleton
40. MA}
? Thread-safe singleton
C Is Meyers singleton thread-safed?
C If not, please implement one
? Template singleton
C Refer to
template<typename T> llvm::ManagedStatic
? Longevity singleton