talloc_realloc

Jeremy Allison jeremy at valinux.com
Tue Mar 6 01:27:11 GMT 2001


On Tue, Mar 06, 2001 at 12:31:13AM +1100, Luke Kenneth Casson Leighton wrote:

> when i described to dr andrew tridgell that i was adding a talloc_realloc,
> i was informed that this makes the purpose of talloc - trivial alloc -
> non-trivial.  therefore, the function is unacceptable.
> 
> now, jeremy adds talloc_realloc.
> 
> this implies that the rejection of the addition of this function was not
> for technical reasons.

I know I shouldn't answer this but......

*I* added talloc_realloc to the 2.2 tree without consultation with
Andrew in order to try and fix the same problem you describe.

I eventually got it working (it was non-trivial) and after much
testing (until 1am :-) discovered that when enumerating a 10,000
printer job queue list it *still* used more than 20mb of virtual
memory more than the less elegent realloc code (which I left working
in head). I finally discussed this with Andrew on Sunday. He was
quite kind (in fact I don't think the words "told you so" passed
his lips once :-).

Dishartened, I went home. That was over the weekend. As I'm working
from home today on a white paper I didn't get chance to revert the 
changes to 2.2 back to the code used in HEAD. I will be doing so
tomorrow and that implementation of talloc_realloc will be history.

So yes it *was* for technical reasons, you just need to be able to
do the tests and determine this for yourself. Now the question remains,
did *you* do those tests and remove it in your code, or did you just
leave it in for the case you tested assuming it was ok for all cases ?

This is why Andrew is the head of the Team, 'cos he can see these
things without the pain I have to go through to see them :-) :-).

Regards,

		Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list