"Effective C++" reading

There is such a book in this world, called those who have read <<Effective C++>> and those who have not. . Experience summary, 55 rules. To put it bluntly, this is skill. The things the girls chirped broke again. Without strength, all skills are nonsense.

For the first time, when I wanted to read this book. It's time to write a memory manager. To manage the application release problem of these small memory. After all, this book is still a little level. If you want to read this book, at least, it took you at least two or three years of C++ level. Some of the nouns and keywords used in it are really difficult to understand the meaning without any level. Those that need attention, those that have not been noticed. However, this book is really broken. After reading it, I realized that there are so many things I didn't notice.

Memory management will bring those advantages:

1. The first is to solve the memory fragmentation problem of frequent application for small memory.

2. The customized new type corresponds to the global new type, and the efficiency will be about 50% faster.

The first two points are to implement such a small memory manager. Also two practical points. Then you can also use Boost's Pool library directly. Well written.

The purpose achieved is that the memory is small, fast, and efficient. As a premise, you have to make sure that the problem is in memory. Don't jump in blindly.

Memory management is a key point that is too big. Deep enough to start from the hardware layer, go in and see how the 0 and 1 of ta are arranged. There is nothing wrong with comparing one by one. If you dig this item alone, you don't know when you will dig it. So our upper layer, application layer users. Just a simple application. Write a simple user-level manager, corresponding to the bottom layer, and improve efficiency.

In other words, when did you become proficient and mention memory management? ? ? ? I can't help but ask myself whether the level has been reached. In many cases, the level is not reached. It is the demand. . I can only bite the bullet and write. Slowly touch the less and less hair on the head.

Guess you like

Origin blog.csdn.net/qq_36912885/article/details/122429101