{"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\/da\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","title":{"rendered":"Microsoft har \u00e5bnet koden til hukommelsesfordelingssystemet mimalloc","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Microsoft har \u00e5bnet et bibliotek under MIT-licensen <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/microsoft\/mimalloc\">mimalloc<\/a><\/noindex> med implementeringer af et hukommelsesfordelingssystem, der oprindeligt blev skabt til runtime-komponenter i sprog <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/koka-lang\/koka\">Koka<\/a><\/noindex> og <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/leanprover\/lean\">Lean<\/a><\/noindex>. Mimalloc er tilpasset til brug i standardapplikationer uden \u00e6ndringer i deres kode og kan fungere som en gennemsigtig erstatning for malloc-funktionen. Det underst\u00f8tter drift p\u00e5 Windows, macOS, Linux, BSD og andre Unix-lignende systemer.<\/p>\n<p>En n\u00f8glefunktion ved mimalloc er kompaktiteten af implementeringen (mindre end 3500 linjer kode) og meget h\u00f8j ydeevne. I <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/microsoft\/mimalloc#performance\">de gennemf\u00f8rte tests<\/a><\/noindex> mimalloc overgik alle konkurrerende hukommelsesfordelingsbiblioteker i ydeevne, herunder <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> og <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/emeryberger\/Hoard\">Hoard<\/a><\/noindex>. <\/p>\n<p>Til vurdering af ydeevnen blev der brugt et s\u00e6t allerede eksisterende  <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/daanx\/mimalloc-bench\">standard tests<\/a><\/noindex> I nogle tests er mimalloc overlegen i forhold til andre systemer med flere gange, for eksempel i testen for migrering af objekter mellem forskellige tr\u00e5de var mimalloc hurtigere end tcmalloc og jemalloc med mere end 2,5 gange. Desuden observeres der i de fleste tests ogs\u00e5 et lavere hukommelsesforbrug, i nogle situationer lykkes det at reducere hukommelsesforbruget med 25%.<\/p>\n<p><center><img decoding=\"async\" alt=\"Microsoft har \u00e5bnet koden til hukommelsesfordelingssystemet mimalloc\" src=\"\/wp-content\/uploads\/05811d717a243138d2bc926697657fa1.png\" style=\"display:block;margin: 0 auto;\" \/><\/center><\/p>\n<p>Den h\u00f8je ydeevne opn\u00e5s hovedsageligt ved at anvende segmentering af listen over frie blokke (free list sharding). I stedet for \u00e9n stor liste anvender mimalloc opdeling i en r\u00e6kke mindre lister, hver af hvilke knyttes til en hukommelsesside. Denne tilgang reducerer fragmentation og forbedrer data-lokalisering i hukommelsen. En hukommelsesside forst\u00e5s som et grupperet s\u00e6t af blokke, der er n\u00e6rmest ens i st\u00f8rrelse. P\u00e5 64-bit systemer er st\u00f8rrelsen p\u00e5 en side typisk 64 kB. Hvis der ikke er optagede blokke tilbage p\u00e5 siden, frigives det helt med tilbagelevering af hukommelsen til operativsystemet, hvilket hj\u00e6lper med at reducere hukommelsesomkostninger og fragmentering i langvarige programmer.<\/p>\n<p>Biblioteket kan tilsluttes under linkningen eller indl\u00e6ses for et allerede samlet program (\"LD_PRELOAD=\/usr\/bin\/libmimalloc.so myprogram\"). I biblioteken leveres der ogs\u00e5 <noindex><a rel=\"nofollow\" href=\"https:\/\/microsoft.github.io\/mimalloc\/group__extended.html\">API<\/a><\/noindex> til integration af funktionalitet i runtime og finjustering af adf\u00e6rd, for eksempel til tilslutning af h\u00e5ndterere for udsat frigivelse af hukommelse og monotone stigninger i reference t\u00e6llere. Der er mulighed for at oprette og bruge flere \"bunker\" (heap) i applikationen til at fordele over forskellige hukommelsesomr\u00e5der. Herunder er det muligt at frigive hele bunken uden at gennemg\u00e5 og frigive de objekter, der er placeret i den enkeltvis.<\/p>\n<p>A safe mode build of the library is available, where special guard pages are inserted at the boundaries of blocks and randomization of block allocation as well as encryption of freed block lists are used. These measures help to block most common buffer overflow exploitation techniques in heaps. Enabling safe mode reduces performance by approximately 3%.<\/p>\n<p>Among the features of mimalloc is its resistance to bloat issues in cases of high fragmentation. In the worst-case scenario, memory consumption increases by 0.2% for metadata and can reach up to 16.7% for allocated memory. Only atomic operations are used in mimalloc to avoid resource access conflicts.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Kilde: <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.3 - 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\/da\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"da_DK\" \/>\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\/da\/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 for the mimalloc memory allocation system | ProHoster","description":"Microsoft has released the mimalloc memory allocation system library under the MIT license, originally created for memory allocation.","canonical_url":"https:\/\/prohoster.info\/da\/blog\/news\/misrosoft-otkryl-kod-sistemy-raspredeleniya-pamyati-mimalloc","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"da_DK","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\/da\/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\/da\/wp-json\/wp\/v2\/posts\/35585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/comments?post=35585"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/35585\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/media?parent=35585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/categories?post=35585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/tags?post=35585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}