MIDLC IDL Compiler

Andrew Tridgell tridge at osdl.org
Fri Jan 14 05:23:33 GMT 2005


 > Actually about "pre-allocating the maximum possible buffer" I no longer
 > see what the big deal is. I mean if you're ultimately going pull all the
 > data into one full size buffer are you really going to save a lot of clock
 > cycles by decoding it in peices?

we don't decode it in pieces. You can't do that with signing and sealing.

 > Why not just wait until you have all the data and then run your
 > marshalling routine once?

we've been talking at complete cross purposes here. We do only run the
decoder once. The comment I made was in regard to the limit pointer
you described in an earlier email. That limit pointer implied to me
that you had to pre-allocate maximum possible sized buffer.

 > Sure. Actually it should be no surprise that I'm planning on using my own
 > garbage collection here. I can't be dragging around talloc.

It's 1k lines of C, and I would be very surprised if it didn't save
you a lot more than that in generated code size and complexity in the

I'm afraid that not using talloc would kill any possibility of using
your compiler in Samba. Converting our code to the hierarchical memory
model in talloc has reduced the complexity of Samba4 by an _enormous_
amount, and having to copy all the complex data structures that come
from unmarshalling a 2nd time to convert all the pointer elements to
talloc would be an unacceptable burden.

The trend we are following is to push it into all our low level
libraries. It's in ldb now, we'll probably be pushing it into tdb, and
we certainly need to have it in our NDR layer.

 > Man I'm just trying to get echo.idl going here. Don't try to sell me
 > extensions :->

I'm just trying to save you having to rework stuff later. Pidl would
have been a lot neater internally if we'd built in the extensions in
the beginning instead of retrofitting them.

Cheers, Tridge

More information about the samba-technical mailing list