{"id":35585,"date":"2019-10-31T22:05:11","date_gmt":"2019-10-31T19:05:11","guid":{"rendered":"https:\/\/prohoster.info\/blog\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc\/"},"modified":"2019-10-31T22:05:11","modified_gmt":"2019-10-31T19:05:11","slug":"misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","title":{"rendered":"Microsoft has opened the source code of the mimalloc memory allocation system","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>The company Microsoft has released the library under the MIT license <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/microsoft\/mimalloc\">mimalloc<\/a><\/noindex> with implementations of the memory allocation system originally created for runtime components of languages <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/koka-lang\/koka\">Koka<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/leanprover\/lean\">Lean<\/a><\/noindex>. Mimalloc is designed for use in typical applications without modifying their code and can serve as a transparent replacement for the malloc function. It supports operation on Windows, macOS, Linux, BSD, and other Unix-like systems.<\/p>\n<p>A key feature of mimalloc is its compact implementation (fewer than 3500 lines of code) and very high performance. In <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/microsoft\/mimalloc#performance\">the conducted tests<\/a><\/noindex> mimalloc outperformed all competing memory allocation libraries, including <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/jemalloc\/jemalloc\">jemalloc<\/a><\/noindex>, <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/gperftools\/gperftools\">tcmalloc<\/a><\/noindex>, <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/microsoft\/snmalloc\">snmalloc<\/a><\/noindex>, <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/rampantpixels\/rpmalloc\">rpmalloc<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/emeryberger\/Hoard\">Hoard<\/a><\/noindex>. <\/p>\n<p>To evaluate performance, a set of already existing  <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/daanx\/mimalloc-bench\">standard tests<\/a><\/noindex> In some tests, mimalloc outperforms other systems by several times; for example, in the test of object migration between different threads, mimalloc was over 2.5 times faster than tcmalloc and jemalloc. At the same time, lower memory consumption is also observed in most tests, with memory usage reduced by up to 25% in certain scenarios.<\/p>\n<p><center><img decoding=\"async\" alt=\"Microsoft has opened the source code of the mimalloc memory allocation system\" src=\"\/wp-content\/uploads\/05811d717a243138d2bc926697657fa1.png\" style=\"display:block;margin: 0 auto;\" \/><\/center><\/p>\n<p>High performance is mainly achieved through the use of free list sharding. Instead of one large list, mimalloc utilizes a series of smaller lists, each tied to a memory page. This approach reduces fragmentation and increases data locality in memory. A memory page is understood as a grouped set of blocks of similar size. On 64-bit systems, the page size is typically 64 KB. If there are no occupied blocks left on a page, it is fully released back to the operating system, which helps reduce memory costs and fragmentation in long-running applications.<\/p>\n<p>The library can be linked at the binding stage or loaded for an already assembled program (\"LD_PRELOAD=\/usr\/bin\/libmimalloc.so myprogram\"). The library also provides <noindex><a rel=\"nofollow\" href=\"https:\/\/microsoft.github.io\/mimalloc\/group__extended.html\">API<\/a><\/noindex> for integrating functionality at runtime and fine-tuning behavior, for example, for connecting delayed memory release handlers and monotonically increasing reference counters. It is possible to create and use multiple \"heaps\" in the application for distribution across different memory areas. In particular, it is possible to release a heap entirely, without traversing and separately releasing the objects placed within it.<\/p>\n<p>A safe mode build of the library is available, in which special guard pages are inserted at the block boundaries, and randomization of block allocation and encryption of released block lists are utilized. Such measures allow blocking most common exploitation techniques used in heap buffer overflows. Enabling safe mode decreases performance by about 3%.<\/p>\n<p>Notably, mimalloc is resilient to bloat issues during significant fragmentation. In the worst-case scenario, memory consumption increases by 0.2% for metadata and can reach 16.7% for allocated memory. To avoid conflicts when accessing resources, mimalloc employs only atomic operations.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=50939\">opennet.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 mimalloc \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u044f runtime-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u044f\u0437\u044b\u043a\u043e\u0432 Koka \u0438 Lean. Mimalloc \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0445 \u043a\u043e\u0434\u0430 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 malloc. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432 Windows, macOS, Linux, BSD \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 Unix-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e mimalloc [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-35585","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 mimalloc \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 mimalloc | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 mimalloc \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:05:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:05:11+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Microsoft has opened the source code of the mimalloc memory allocation system | ProHoster","description":"Microsoft has released under the MIT license the mimalloc library, a memory allocation system originally developed.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438 mimalloc | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Mi\u0441rosoft \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 mimalloc \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:05:11+00:00","article:modified_time":"2019-10-31T19:05:11+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"35585","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 23:52:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:59:36","updated":"2026-01-21 23:52:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/35585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=35585"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/35585\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=35585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=35585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=35585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}