Assembly view pointer

preface Pointers are often used in development to access variables and modify variable values. How does the compiler translate pointers or what are pointers at the assembly level mov and lea instructions Pointer analysis is inseparable from these two instructions. Take a simple look at the mov instruction mov instruction When the GNU assem ...

Posted on Fri, 19 Nov 2021 08:35:41 -0500 by bguzel

The direct exchange address of the custom swap function is invalid

Custom swap function We all know that the value transfer cannot change the value of the actual variable when the parameter is passed. To operate with the pointer, we have encountered a very simple problem today That's what I wrote before. Pass the pointer in, and then change the value pointed to by the pointer to achieve the effect of excha ...

Posted on Thu, 28 Oct 2021 10:03:53 -0400 by savagenoob

C pointer learning

Lesson 9: pointer (the soul of C language) Definition of pointer: pointer is essentially a variable, and this variable can only store one memory address (number) forever Therefore, the technical term corresponding to this variable is called pointer variable Through the address saved by the pointer variable, you can access this memory area arb ...

Posted on Tue, 26 Oct 2021 21:31:51 -0400 by buzzed_man

Heap and Huffman tree (data structure: under the tree by Zhejiang University mooc)

Heap Priority queue: for a special queue, the order of taking out elements is based on the priority (keyword) size of elements, not the order in which elements enter the queue The priority queue is realized by array or linked list Array: Insert, element always inserts tail O(1)Delete, find the maximum (or minimum) keyword O(n), and delete t ...

Posted on Sun, 10 Oct 2021 08:36:00 -0400 by Canman2005