[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-515119-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-515119-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","modern-garbage-collector-for-hashlink-and-its-formal-verication-meng-individual-project","Modern garbage collector for HashLink and its formal veriﬁcation - MEng Individual Project","","Haxe is a high-level language compiling to multiple targets, including HashLink, a dedicated virtual machine backend. Since Haxe targets require garbage collection, HashLink’s existing mark-and-sweep variant is too slow in GC-bound benchmarks. The project introduces an Immix-based GC for HashLink, leveraging Immix’s fast allocation and cache-optimised collection. It evaluates performance across benchmarks and formalises correctness in Coq, proving the implementation against the abstract model using VST-Floyd and CompCert.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/modern-garbage-collector-for-hashlink-and-its-formal-verication-meng-individual-project/515119/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/modern-garbage-collector-for-hashlink-and-its-formal-verication-meng-individual-project/515119.png","ImageObject",300,407,{"name":42,"@type":43},"นรินทร์","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-16","2026-10-06",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",10,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Why does HashLink need a new garbage collector?","Question",{"text":63,"@type":64},"Haxe requires garbage collection for its targets, and HashLink’s current mark-and-sweep implementation is slow in GC-bound benchmarks.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What GC approach is implemented for HashLink in this project?",{"text":68,"@type":64},"The project implements an Immix-based garbage collector, chosen for minimal interface changes, fast allocation, and CPU-cache-optimised collection.",{"name":70,"@type":61,"acceptedAnswer":71},"How is the garbage collector correctness verified?",{"text":72,"@type":64},"An abstract GC model is defined in Coq, then the implementation is proved to correctly implement the model using VST-Floyd and CompCert.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},515119,1791497428,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":55,"slug":125},"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145,"preview_page_count":112,"preview_urls":146},2336475104957,"https://ap-avatar.wpscdn.com/avatar/22000c4c6bd8a5076e1?x-image-process=image/resize,m_fixed,w_180,h_180&k=1787554080175789136","MEng Individual Project  \nImperial College London  \nDepartment of Computing  \nModern garbage collector for HashLink and its formal veriﬁcation  \nAuthor:  \nAurel Bílý  \nSupervisor: Prof. Susan Eisenbach  \nSecond Marker: Prof. Sophia Drossopoulou  \nJune 15, 2020  \nAbstract  \nHaxe [1] is a high-level programming language that compiles code into a number of targets, including other programming languages and bytecode formats. HashLink [2] is one of these targets: a virtual machine dedicated to Haxe. There is no manual memory management in Haxe, and all of its targets, including HashLink, must have a garbage collector (GC) . HashLink’s current GC implementation, a variant of mark-and-sweep, is slow, as shown in GC-bound benchmarks.  \nImmix [3] is a GC algorithm originally developed for Jikes RVM [4] . It is a good alternative to mark-and-sweep because it requires minimal changes to the interface, it has a very fast allocation algorithm, and its collection is optimised for CPU memory caching. We implement an Immix-based GC for HashLink.  \nWe demonstrate signiﬁcant performance improvements of HashLink with the new GC in a variety of benchmarks. We also formalise our GC algorithm with an abstract model deﬁned in Coq [5], and then prove that our implementation correctly implements this model using VST-Floyd [6] and CompCert [7] . We make the connection between the abstract model and VST-Floyd assertions in a novel way, suitable to complex programs with a large state.  \nAcknowledgements  \nFirstly, I would like to thank Lily for her never-ending support and patience.  \nI would like to thank my supervisor, Susan, for the great advice and intellectually stimulating discussions over the years, as well as for allowing me to pursue a project close to my heart.  \nI am also grateful to the welcoming Haxe developer team, without whom this project would not be possible.  \nLast but not least, thank you, my friends, for the great 4 years.  \nContents  \n1 Introduction 6  \n1.1 Haxe ........................................ 6  \n1.2 Garbage collection ................................ 6  \n1.3 HashLink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7  \n1.4 Just-in-time compilation, HashLink/C, and libhl ............. 7  \n1.5 Project goals ................................... 8  \n1.6 Outline ....................................... 8  \n2 Background 10  \n2.1 Introduction ................................... 10  \n2.2 Garbage collection ................................ 10  \n2.2.1 Performance metrics .......................... 11  \n2.2.2 Tracing garbage collection ...................... 12  \n2.2.3 Generational GC ............................. 13  \n2.2.4 Concurrent GC .............................. 13  \n2.2.5 Modern architectures ......................... 14  \n2.2.6 Immix ................................... 14  \n2.3 Haxe, HashLink, HashLink/C ......................... 15  \n2.3.1 GC for immutable data ......................... 15  \n2.3.2 Dynamic types .............................. 15  \n2.3.3 GC interface ............................... 15  \n2.3.4 HashLink Just-in-time ........................ 16  \n2.4 Benchmarks ................................... 16  \n2.4.1 GC tuning ................................. 17  \n2.5 Veriﬁcation .................................... 17  \n2.6 Summary ..................................... 18  \n3 Immix-based garbage collector for HashLink 19  \n3.1 Introduction ................................... 19  \n3.2 Immix ....................................... 19  \n3.3 Implementation details ............................. 20  \n3.3.1 Memory organisation and sizes ................... 21  \n3.3.2 Global OS page management ..................... 21  \n3.3.3 GC page management ......................... 22  \n3.3.4 Free block pool ............................. 23  \n3.3.5 Blocks ................................... 23  \n3.3.6 Block lifetime .............................. 24  \n3.3.7 Objects .................................. 24  \n3.3.8 Alloc","cbCaigDO1QLFv0vI","https://ap.wps.com/l/cbCaigDO1QLFv0vI","pdf",274485,75,"English","# Contents\n## Introduction\n## Background\n## Immix-based garbage collector for HashLink\n## Evaluation\n## Abstract model","[{\"question\":\"Why does HashLink need a new garbage collector?\",\"answer\":\"Haxe requires garbage collection for its targets, and HashLink’s current mark-and-sweep implementation is slow in GC-bound benchmarks.\"},{\"question\":\"What GC approach is implemented for HashLink in this project?\",\"answer\":\"The project implements an Immix-based garbage collector, chosen for minimal interface changes, fast allocation, and CPU-cache-optimised collection.\"},{\"question\":\"How is the garbage collector correctness verified?\",\"answer\":\"An abstract GC model is defined in Coq, then the implementation is proved to correctly implement the model using VST-Floyd and CompCert.\"}]","Modern garbage collector for HashLink and its formal veriﬁcation - MEng Individual Project | PDF",1791307213,189,[147,151,155,159,163,167,171,175],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/a6d1affd8158f025eae6510c20ad923b.webp",983,1390,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e76107faccb6ad798d91667293567a6b.webp",982,1388,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/8f41662eb11d939492d1f597ca6a72c2.webp",981,1387,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0aa77829d239e9e17ee687e653c02705.webp",980,1385,{"page_no":97,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/615e5799ebfccd045ee2d737444f336a.webp",979,1384,{"page_no":102,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/bcdbaf7aa17c882275d06a65188a277e.webp",978,1383,{"page_no":107,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ea001d4698fe1d08c5745f25d6546e7a.webp",977,1381,{"page_no":112,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/71838d1dbb6231d6fe8ba4e63c4ba65a.webp",976,1380]