C + + can manage its own memory, like Nginx can be based on their business characteristics, for each request to allocate a memory pool, the request is over, the memory pool can be released
How does a high-level language like python,node.js solve the memory fragmentation problem?
People who preach node. JS will mention that node. JS has Google's V8 engine, how advanced he is, but he did not think that V8 is designed for the browser, he does not encounter a server-side program will encounter a memory fragmentation problem, a page can not be opened, the page is closed, the memory is all released. Server-side program will encounter memory fragmentation problems, similar to the file system, a 4KB block, only 1KB, the other 3kb is wasted, there is no way to recycle. Or regularly defragment the disk, seemingly Java will be similar to defragment the disk as the object, pay the price is to consume the CPU. V8 did not do anything, in fact, he did not need to do, because he is designed for the browser, in the browser application scene there is no problem, design time will not be considered.
Now think of a PHP is really the best programming language (laughter), simple enough, every moment is new.
How does high-level language solve memory fragmentation?