{"id":31029995,"url":"https://github.com/yusing/qalloc","last_synced_at":"2025-09-13T22:57:39.623Z","repository":{"id":43767549,"uuid":"509295286","full_name":"yusing/qalloc","owner":"yusing","description":"A quick pool allocator for c++ with type info and gc support ","archived":false,"fork":false,"pushed_at":"2022-07-13T08:34:59.000Z","size":422,"stargazers_count":72,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2023-05-21T22:23:40.411Z","etag":null,"topics":["allocator","cpp","cpp11","cpp14","cpp17","pool-allocator"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"yusing","patreon":"yusing"}},"created_at":"2022-07-01T02:26:56.000Z","updated_at":"2023-03-03T15:44:51.000Z","dependencies_parsed_at":"2022-08-31T23:01:12.542Z","dependency_job_id":null,"html_url":"https://github.com/yusing/qalloc","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/yusing/qalloc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fqalloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fqalloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fqalloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fqalloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusing","download_url":"https://codeload.github.com/yusing/qalloc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fqalloc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275038258,"owners_count":25394640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allocator","cpp","cpp11","cpp14","cpp17","pool-allocator"],"created_at":"2025-09-13T22:57:23.040Z","updated_at":"2025-09-13T22:57:39.608Z","avatar_url":"https://github.com/yusing.png","language":"C++","readme":"\u003cdiv id=\"top\" style=\"visibility:hidden\"\u003e\u003c/div\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n![Size][size-shield]\n[![MIT License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/yusing/qalloc\"\u003e\n    \u003cimg src=\"https://github.com/yusing/qalloc/raw/main/images/logo.png\" alt=\"Logo\" height=\"60\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003eQAlloc\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A quick pool allocator for c++ with type info and gc support \n    \u003cbr /\u003e\n    \u003ca href=\"https://yusing.github.io/qalloc\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/yusing/qalloc/blob/main/example.cpp\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/yusing/qalloc/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/yusing/qalloc/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#benchmark-results\"\u003eBenchmark Results\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#roadmap\"\u003eRoadmap\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nThe project is a simple, fast, and memory-efficient pool allocator for c and c++.\n**It is still underdevelopment and not production ready. More testing is needed to ensure it works in general cases.**\n\n### Features:\n* Header only\n* Type-aware memory management\n* Garbage collection\n* Dynamic pool size\n\n### Requirements\n* Compiler that supports `c++ 11` or later\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nThis is an example of how you may give instructions on setting up your project locally.\nTo get a local copy up and running follow these simple example steps.\n\n### Prerequisites\n\nA c++ compiler supporting `c++ 11` or later is required.\n\nFor example: \n* clang++ (linux, macos, windows, etc.)\n* g++ (linux, macos, windows, etc.)\n* msvc (windows)\n* mingw (windows)\n* cygwin-gcc (windows)\n\n### Installation\n\nThis is a header-only library. Doesn't require any other dependencies.\n\n1. Clone the repo\n   ```sh\n   git clone https://github.com/yusing/qalloc.git\n   ```\n2. Add `include` as include path to your project\n3. Include `\u003cqalloc/qalloc.hpp\u003e` in your project\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n_For examples, please refer to [example.cpp](https://github.com/yusing/qalloc/blob/main/example.cpp)_\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- BENCHMARK RESULTS --\u003e\n## Benchmark Results\n\n_See [benchmark.cpp](https://github.com/yusing/qalloc/blob/main/src/benchmark/benchmark.cpp) for source code_\n\n### Running Platform:\n- Windows 11 21H1\n- Intel i7-10700K CPU @ 5.00GHz 16GB RAM\n- Clang 14.0.6 c++17 x64 build\n\n#### String vector emplace and reset\n| Benchmark                              | Time    | CPU     | Iterations | Speed         |\n|----------------------------------------|---------|---------|------------|---------------|\n| Std_Vector_String_Emplace_Reset        | 1817 ns | 1800 ns | 373333     | ️ 207 it/ns   |\n| Std_Vector_QAlloc_String_Emplace_Reset | 2257 ns | 2197 ns | 320000     | ️ 145 it/ns   |\n| QAlloc_Vector_Std_String_Emplace_Reset | 313 ns  | 311 ns  | 2357895    | 7581 it/ns 🚀 |  \n| QAlloc_Vector_String_Emplace_Reset     | 521 ns  | 516 ns  | 1120000    | 2170 it/ns 🚀 |\n\n#### Int vector emplace and reset\n| Benchmark                       | Time   | CPU    | Iterations | Speed         |\n|---------------------------------|--------|--------|------------|---------------|\n| Std_Vector_Int_Emplace_Reset    | 703 ns | 711 ns | 1120000    | 1593 it/ns     |\n| QAlloc_Vector_Int_Emplace_Reset | 110 ns | 112 ns | 6400000    | 57142 it/ns 🚀 |\n\n#### String creation\n| Benchmark              | Time     | CPU      | Iterations | Speed        |\n|------------------------|----------|----------|------------|--------------|\n| Std_String_Creation    | 0.206 ns | 0.203 ns | 1000000000 | 4.9B it/ns    |\n| QAlloc_String_Creation | 1.63 ns  | 1.61 ns  | 407272727  | 0.25B it/ns ❌ |\n\n#### String append and reset\n| Benchmark                  | Time   | CPU    | Iterations | Speed        |\n|----------------------------|--------|--------|------------|--------------|\n| Std_String_Append_Reset    | 834 ns | 837 ns | 896000     | 1070 it/ns    |\n| QAlloc_String_Append_Reset | 311 ns | 318 ns | 2357895    | 7414 it/ns 🚀 |\n\n#### unordered_map\\\u003cint, int\u003e insert and reset\n| Benchmark                                 | Time    | CPU     | Iterations | Speed      |\n|-------------------------------------------|---------|---------|------------|------------|\n| Std_Unordered_Map_Int_Int_Insert_Reset    | 5623 ns | 5625 ns | 100000     | 17 it/ns    |\n| QAlloc_Unordered_Map_Int_Int_Insert_Reset | 3436 ns | 3488 ns | 224000     | 64 it/ns 🚀 |\n\n#### list\\\u003cdouble\u003e emplace and reset\n| Benchmark                        | Time    | CPU     | Iterations | Speed       |\n|----------------------------------|---------|---------|------------|-------------|\n| Std_List_Double_Emplace_Reset    | 3960 ns | 3924 ns | 179200     | 45 it/ns     |\n| QAlloc_List_Double_Emplace_Reset | 1940 ns | 1957 ns | 407273     | 208 it/ns 🚀 |\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- ROADMAP --\u003e\n## Roadmap\n\n- [ ] Diagrams on how it works internally\n- [ ] More tests on different memory patterns\n- [ ] Compare to other pool allocators\n- [ ] Better benchmark cases\n- [ ] Full documentation\n- [ ] Full multi-thread support\n- [ ] c++20 constexpr\n- [ ] Memory allocation visualization\n\nSee the [open issues](https://github.com/yusing/qalloc/issues) for a full list of proposed features (and known issues).\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\nAlternatively, you can create feature requests on the [open issues](https://github.com/yusing/qalloc/issues/new?assignees=\u0026labels=\u0026template=feature_request.md\u0026title=) page.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the Apache 2.0 License. See `LICENSE` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nyusing - yuzer.w@proton.me\n\nProject Link: [https://github.com/yusing/qalloc](https://github.com/yusing/qalloc)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[size-shield]: https://img.shields.io/github/repo-size/yusing/qalloc\n[contributors-shield]: https://img.shields.io/github/contributors/yusing/qalloc\n[contributors-url]: https://github.com/yusing/qalloc/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/yusing/qalloc\n[forks-url]: https://github.com/yusing/qalloc/network/members\n[stars-shield]: https://img.shields.io/github/stars/yusing/qalloc\n[stars-url]: https://github.com/yusing/qalloc/stargazers\n[issues-shield]: https://img.shields.io/github/issues/yusing/qalloc\n[issues-url]: https://github.com/yusing/qalloc/issues\n[license-shield]: https://img.shields.io/github/license/yusing/qalloc\n[license-url]: http://www.apache.org/licenses/LICENSE-2.0\n","funding_links":["https://github.com/sponsors/yusing","https://patreon.com/yusing"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fqalloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusing%2Fqalloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fqalloc/lists"}