[PATCH] Change unix_convert to use struct smb_filename
Volker.Lendecke at SerNet.DE
Fri May 1 08:22:07 GMT 2009
On Thu, Apr 30, 2009 at 12:02:32PM -0700, Tim Prouty wrote:
> I was considering that option, but since we already had a talloc_ctx
> being passed around, it seemed simpler to just have the smb_filename
> struct sit on the stack. I guess one possible advantage of tallocing
> an smb_filename struct is that the talloc_ctx arg could be eliminated
> from unix_convert, further simplifying the API.
No, I mean unix_convert should create smb_filename, changing
the argument to "struct smb_filename **smb_fname" :-)
> I'm not familiar with the talloc_pool trick. Are there examples of
> the trick in use elsewhere?
I'd use this only if this turns to be out to be a noticeable
performance hit. Just allocate a talloc_pool that can carry
all the children's memory, and allocating the children won't
call malloc(3) anymore.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20090501/fb2ec621/attachment.bin
More information about the samba-technical