[RFC] [CTDB] Optimized memory handling.
Swen Schillig
swen at vnet.ibm.com
Thu Dec 14 14:59:16 UTC 2017
On Thu, 2017-12-14 at 14:46 +0100, Swen Schillig via samba-technical
wrote:
>
> 3) @Amitay: I really like the removal (in comparison to ctdb_io) of
> the really expensive "data" memory / memcpy thing, that on it's
> own
> should save time already. I just have to make sure to change all
> the callbacks for ctdb_io to NOT free that memory anymore.
>
I'm afraid I was a bit too quick here.
One thing I forgot about, even though I pointed that out as a ToDo, is
that the callbacks are responsible to free the memory behind "data".
But they mustn't do that because it is not a copy anymore. This memory
is stolen at some point in the call chain which unfortunately isn't
always on the first level.
For now I decided to re-introduce the data_pool again (now in
sock_io.c)
Cheers Swen
More information about the samba-technical
mailing list