Dynamic memory management

Stack memory and heap memory The declared variables and function names are stack memory, but heap memory is used in dynamic memory management. Stack memory is relatively compact, so it has large local correlation. There is a dynamic expansion in the heap during operation, and the release needs to be displayed. new is called at run time. ve ...

Added by argan328 on Thu, 17 Feb 2022 20:12:06 +0200

AVL tree - balanced binary tree

catalog: I Concept & principle Previously, we understood the binary search tree, but we found that if the data is orderly or close to orderly, the binary search tree will degenerate into a single tree AVL tree is a balanced binary tree. It just adds a balance factor to the binary search tree to form the current balanced bi ...

Added by cbrknight on Fri, 11 Feb 2022 13:19:17 +0200

Android R(11) adds the death recipients callback of HIDL service for the client

Generally, the caller (client) of HIDL service is not in the same process with it. HIDL service generally provides hardware functions, and the caller (client) realizes characteristic functions based on this hardware function. Here, it is assumed that HIDL light service only provides the hardware function to control the on and off of specific LE ...

Added by michaelnorth on Sat, 05 Feb 2022 12:22:31 +0200

C + + Learning Notes 1

C + + learning notes object-oriented Input and output #include <iostream> using namespace std; int main(){ char s[30]; cout << "say someting to echo:" << endl; cin >> s; cout << s << endl; return 0; } Header files and class declarations Defensive statement #ifndef __COMPLEX__ #define __CO ...

Added by scrtagt69 on Sat, 08 Jan 2022 06:40:55 +0200

Design pattern (C + +)

Design mode (I) 1. Singleton mode definition The singleton pattern is that a class can only be instantiated once, more precisely, a class with only one instantiated object. This class can only have one instance (only create a new object when the pointer is null, otherwise return the original object);It must create the instance itself (the c ...

Added by Crysma on Mon, 27 Dec 2021 12:31:54 +0200

Where is the virtual table pointer

Virtual table pointer Someone in the group asked. I wrote it Starting from the simplest class, there are differences between single inheritance and multi inheritance virtual table pointers Code in 32 environment: Write the conclusion first:           Virtual table pointer is assigned in constructor and destructor ( ...

Added by cyberdwarf on Wed, 24 Nov 2021 01:06:27 +0200