How does high-level language solve memory fragmentation?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.