On Wednesday 20 July 2005 01:58 pm, Tim Esselens wrote: > Tom Schindl wrote: > >> You're right, I've should have printed $r, which yields: > >> > >> Apache2::RequestRec=SCALAR(0x9d44644) [first n times] > >> Apache2::RequestRec=SCALAR(0x9d7e0a4) > >> (n begin the number of apache children) > >> > >> Am I correct in assuming that the Apache2::RequestRec object is now > >> sitting in 0x9d44644 or is that just the mem address of the scalar, > >> which changes, but is still pointing to the same RequestRec.
> > No. For every Request a ***NEW*** Request object is created! It's only > > the pointer to it is written to the same location (e.g. 0x9d44644) but > > maybe I'm not correct here. > Ah, i see, but then my question remains, why is this location changed after > n hits (n = # of apache children) Just a stab in the dark: If you have a completely round-robin series of hits (ie. each child is hit once in order before any child is hit twice). The initial setup is completely deterministic - all children start with the same state as they are forked from the same process. So in each child, the first allocation occurs at the same address. Then second time around, it's allocated somewhere else. (And if all your hits are completely deterministic and identical, then that location may be the same in all children too).