mfunyu / malloc

Find out the workings behind optimum memory management and recode it, as well as free and realloc.
2 stars 0 forks source link

[crush] unexpected index size #57

Closed mfunyu closed 5 months ago

mfunyu commented 5 months ago
$> MallocDebug=1 make test
...
[ RUN      ] MallocSmallTest.FillUp
make: *** [Makefile:139: test] Error 139

 = 0x7fe6b0509410
[ malloc]                 : malloc(100352)size: 100352
chunk_size: 100864
largebin_index
chunk2: 0x0
top: 0x7fe6b0521c00
chunk4: 0x7fe6b0521c00
chunk5: 0x7fe6b0521c00
chunk3: 0x7fe6b0521c00
 = 0x7fe6b0521c10
[ malloc]                 : malloc(100379)size: 100379
chunk_size: 100864
largebin_index
chunk2: 0x0
top: 0x7fe6b053a600
chunk4: 0x7fe6b053a600
freelist_add
chunk_size: 35296
index: 2204
Segmentation fault (core dumped)
mfunyu commented 5 months ago

index: 2204 caused by calculation based on size TINY.

mfunyu commented 5 months ago