microsoft / microsoft/mimalloc
Is it possible to remove the limit on MI_ALIGNMENT_MAX?
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 13.4k
- Fork
- 1.2k
- Merge medio
- 4g 45m
- PR unite (30g)
- 13
Descrizione
I'm having some problems with the restriction on max alignment size MI_ALIGNMENT_MAX in mimalloc v1.7.6. I know that this restriction is to reduce memory waste, but in our project we use memalign with alignment set to 4MiB and size set to 4MiB, which helps we get our object header fast by masking bits, just like what mimalloc does with segments. I have read this issue #576 and I know that dev-slice branch is expanding this limit to 16MiB. Still I'm wondering could we just remove this limit, and do any alignment allocation regardless of however big the alignment is? This might be a potential requirement in our project. If it is possible, what change should I do to mimalloc code? I notice that aside from the macro defined in mimalloc.h, there is also a preprocessor error in mimalloc-types.h which limit MI_ALIGNMENT_MAX to be no more than half of MI_SEGMENT_SIZE.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia con le definizioni e la validazione di MI_ALIGNMENT_MAX in include/mimalloc.h e include/mimalloc-types.h, poi leggi l’issue #576 e confronta il limite ampliato del branch dev-slice. Determina se un allineamento arbitrario è compatibile con i vincoli dell’allocator; il lavoro è completato quando esiste un design supportato oppure una spiegazione chiara del motivo per cui il limite deve rimanere invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c
- Ambito
- operating-systems, performance
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100