|
From: Christoph B. <bar...@gm...> - 2007-07-13 07:57:17
|
Hi, after about 10 hours of runtime arena_malloc begins to use more and more of runtime. After 15 hours arena_malloc uses around 25%. This is dependent on the usage pattern but this behaviour might be the reason why the current subroutine runs a week instead of the expected two hours. It seems as if the following line (around line 1063) is executed too often: if (b_bszB >= req_bszB) goto obtained_block; // success! I have attached a simple graph that shows how often the comparison is done. For each million of allocations I have summed up the number of such comparisons and divided by the number of allocations. The x-axis shows the allocations in millions. There are currently about 2.100.000.000 allocations. For each set of a million allocations there is the average number of comparisons shown on the y-axis. We see that for the first 1.450.000.000 allocations the average number of comparisons per allocation is about 1. There is a peak around 750.000.000 where for some time there were 600 comparisons per allocation. With the usage pattern that starts at 1.500.000.000 allocations the numbers get bigger. More time is spent to find a block. Is there a document that describes the workings of the arena implementation? It would help to reason about the causes of such a behaviour. Greetings Christoph |