dlmalloc: account the footprint of the initial heap#496
dlmalloc: account the footprint of the initial heap#496sunfishcode merged 1 commit intoWebAssembly:mainfrom
Conversation
While malloc_stats and friends are disabled and unused for wasi-libc, it's neater to be consistent. Background: My colleagues for some reasons enabled malloc_stats and asked me why it reports negative values. Note: Depending __heap_base, init_top() adjusts the address for alignment. I think the amount of this adjustment is reported as "used" by malloc_stats. I don't bother to "fix" it.
|
This looks reasonable to me. It doesn't even look wrong that this doesn't account for We may want to |
|
Do you know why upstream dlmalloc doesn't do this? Is this a bug in dlmalloc? Can you mark these lines with |
|
This code is code that we added for WASI, so it's already under |
i agree it isn't necessarily wrong. i mentioned it just because my colleagues will likely have a question.
maybe. |
While malloc_stats and friends are disabled and unused for wasi-libc, it's neater to be consistent.
Background: My colleagues for some reasons enabled malloc_stats and asked me why it reports negative values.
Note: Depending __heap_base, init_top() adjusts the address for alignment. I think the amount of this adjustment is reported as "used" by malloc_stats. I don't bother to "fix" it.