microsoft / microsoft/mimalloc
Confusing debug prints
Nessuno ha ancora preso questa issue.
- Lingua principale
- C
- Stelle
- 13.4k
- Fork
- 1.2k
- Merge medio
- 4g 45m
- PR unite (30g)
- 13
Descrizione
When allocating & deleting small memory blocks sequentially, some confusing debug prints appear randomly. The debug message says "pointer might not point to a valid heap region" and "this may be still valid very large allocation (over 64MiB)" but my allocations always smaller than 300 bytes.
Should I ignore this message or it is a bug or am I using the library incorrectly?
alloc 272 [0000040000030140]
alloc 16 [00000400000102E0]
alloc 16 [0000040000010300]
alloc 16 [0000040000010320]
alloc 40 [00000400000400C0]
alloc 16 [0000040000010340]
alloc 16 [0000040000010360]
alloc 16 [0000040000010380]
delete 16 [0000040000010380]
alloc 8 [0000040000001550]
alloc 4 [0000040000001560]
alloc 8 [0000040000001570]
alloc 4 [0000040000001580]
delete 64 [0000040000020050]
delete 16 [0000040000010020]
delete 64 [0000040000020000]
delete 16 [0000040000010000]
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 0000040000080000
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 0000040000080000 was valid after all)
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 0000040000080000
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 0000040000080000 was valid after all)
alloc 248 [0000040000080000]
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 00000400000400F0
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 00000400000400F0 was valid after all)
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 00000400000400F0
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 00000400000400F0 was valid after all)
alloc 32 [00000400000400F0]
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 00000400000103A0
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 00000400000103A0 was valid after all)
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 00000400000103A0
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 00000400000103A0 was valid after all)
alloc 16 [00000400000103A0]
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 0000040000040120
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 0000040000040120 was valid after all)
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 0000040000040120
> (this may still be a valid very large allocation (over 64MiB))
> mimalloc: warning: (yes, the previous pointer 0000040000040120 was valid after all)
alloc 32 [0000040000040120]
> mimalloc: warning: mi_usable_size: pointer might not point to a valid heap region: 00000400000103C0
> (this may still be a valid very large allocation (over 64MiB))
alloc 16 [00000400000103C0]
delete 16 [00000400000103C0]
alloc 16 [00000400000103E0]
alloc 64 [0000040000020190]
alloc 16 [0000040000010400]
delete 16 [0000040000010400]
delete 32 [0000040000040120]
delete 16 [00000400000103A0]
delete 32 [00000400000400F0]
delete 248 [0000040000080000]
alloc 248 [0000040000080100]
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 riproducendo il pattern sequenziale di piccole allocazioni e tracciando il percorso dell’avviso di mi_usable_size. Determina perché puntatori piccoli validi attivano l’avviso di allocazione grande, quindi verifica che gli avvisi non compaiano più erroneamente oppure che il loro comportamento sia documentato. L’issue non indica file sorgente né test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c
- Ambito
- operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100