Strange behavior in 'malloc_stats' function
问题 I'm doing some tests with 'malloc_stats' function and I've seen a strange behavior that I don't understand. The test is very easy, what I'm doing is allocate memory and print the 'malloc_stats' before the allocation, after the allocation and after free the memory. This is the code I'm using: int main(int argc, char *argv[]) { char *alloc[MAX_ALLOCS]; if ( argc < 3 or strcmp(argv[1], "--help") == 0 ) { cout << argv[0] << " num-blocks block-size [free-step [start-free [end-free]]]" << endl;