microsoft / microsoft/mimalloc

[Ask for help] Use mimalloc Heap for GC?

Open
#298 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
13.4k
Forks
1.2k
Avg merge
4d 45m
Merged PRs (30d)
13

Description

I want to do mostly precise GC and for scanning roots I need a way to find heap pointer, do I understand correctly that to identify allocated heap pointer I should use mi_heap_check_owned and mi_heap_contains_block like this?


void cons_root(gc_heap* gc ,void**start,void**end) {
    for (;start < end;start++) {
          if (mi_heap_check_owned(gc->mi_heap,*start) && mi_heap_contains_block(gc->mi_heap,*start) { push_gray(gc,*start); } 
    }
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reading the APIs for mi_heap_check_owned and mi_heap_contains_block and the surrounding heap ownership documentation, then determine whether the proposed cons_root scan meets the intended root-identification behavior. Done means resolving the API usage question or documenting the correct guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.