Re: talloc

2002-07-15 Thread Gerald Carter
On Sun, 14 Jul 2002, Tim Potter wrote: > Isn't this going to cause horrible problems if you pass in a a piece of > memory that has already been allocated by talloc? It looks like you > must pass in memory allocated my mallloc() unless you want to have a > double free happeni

Re: talloc

2002-07-15 Thread Simo Sorce
Tim, yes I'm going to modify the code to reflect just that :) I wanted to have also a non talloc possibility, and just toght ot is possible simply making a malloc instead of a talloc if the mem_ctx is null. :) Simo. On Mon, 2002-07-15 at 07:54, Tim Potter wrote: > On Sat, Jul 13, 2002

Re: talloc

2002-07-14 Thread Tim Potter
On Sat, Jul 13, 2002 at 06:01:41PM +0200, Simo Sorce wrote: > any objection into adding a function to talloc to import a previously > allocated memory? > > something like that: > > bool talloc_memorize(TALLOC_CTX *t, void *src, size_t src_size) Hi Simo. Isn't this

talloc

2002-07-13 Thread Simo Sorce
any objection into adding a function to talloc to import a previously allocated memory? something like that: bool talloc_memorize(TALLOC_CTX *t, void *src, size_t src_size) { struct talloc_chunk *tc; if (!t || !src || !src_size) return false; tc = malloc(sizeof(*tc