This web mail archive is frozen.
This page is part of a frozen web archive of this mailing list.
You can still navigate around this archive, but know that no new mails
have been added to it since July of 2016.
Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.
On Oct 5, 2009, at 9:23 AM, Fawzi Mohamed wrote:
> yes you are right, I was unclear, I meant that I would pass a cpu_set
> struct by value (not always pass a pointer).
> If one wants to later migrate to passing just a pointer, then
> internally this struct can have just a single pointer as field.
But if that struct contains a dynamically-malloced pointer, then we
might get issues about confusion of ownership of the sub-data...
> indeed, if you alloc, and it is fixed size (no sparse structure) then
> one can just call free, but in general having a structure specific
> free function gives just a lot more flexibility for the future (and is
> needed to copy unknown size structs).
I agree about the future, but it would seem weird if we have alloc/
free functions for public structs. No one will use them, and then
when/if we *do* change to opaque handles (or equiv), they *will* have
to change their code. Kinda defeats the point.
So I think we can't go half-n-half -- it's either public structs until
2.0 or something opaque (where you *have* to use hwloc alloc/free