On Thursday 04 May 2006 18:17, Chris Darroch wrote: > Hi -- > > It looks to me like the memory allocated for ap_scoreboard_image > is a little bit over-sized. In r104404 the lb_score elements were > added to the scoreboard in the manner of the worker_score array, > and then in r105134 much of this was reversed, but the call to > calloc() still sizes ap_scoreboard_image as if a two-dimensional > array was required. > > Chris. > > ===================================================================== > --- server/scoreboard.c.orig 2006-05-02 09:52:09.803650679 -0400 > +++ server/scoreboard.c 2006-05-03 10:17:13.273161088 -0400 > @@ -117,8 +117,7 @@ > > ap_calc_scoreboard_size(); > ap_scoreboard_image = > - calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score > *) + - server_limit * lb_limit * sizeof(lb_score *)); > + calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score > *)); more_storage = shared_score; > ap_scoreboard_image->global = (global_score *)more_storage; > more_storage += sizeof(global_score);
Looks right for ap_init_scoreboard, and there's nothing else relevant in scoreboard.c. A quick grep suggests it's globally right, so +1. Your patch 2: an easier +1. Patch 3 - again +1; colm thinks it unnecessary, but it's at worst harmless. Patches 4/5: bug me if I don't get around to reviewing them over the weekend. Nice work on some of apache's hairiest code! -- Nick Kew
