On Fri, Mar 20, 2026 at 11:42:36AM -0300, Fabiano Rosas wrote:
> Peter Xu <[email protected]> writes:
> 
> > Introduce a new flag, VMS_ARRAY_OF_POINTER_AUTO_ALLOC, for VMSD field.  It
> > must be used together with VMS_ARRAY_OF_POINTER.
> >
> 
> Sorry if I missed it somewhere, I was a bit tired yesterday when I

I haven't read it, I will read it, at some point.. Fridays normally aren't
as busy.

Since this one is shorter I'll reply fast,

> looked at this series, but why can't we reuse the currently invalid
> VMS_ALLOC|VMS_ARRAY_OF_POINTER combination?

This only handles allocation of the field as a whole.  Say if it's an array
this makes sure the array will be allocated properly on dest.  It doesn't
cover the fields in the array.

Btw, it's exactly the given example described below that this wants to do:

> 
>     /* When loading serialised VM state, allocate memory for the
>      * (entire) field. Only valid in combination with
>      * VMS_POINTER. Note: Not all combinations with other flags are
>      * currently supported, e.g. VMS_ALLOC|VMS_ARRAY_OF_POINTER won't
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>      * cause the individual entries to be allocated. */
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >     
<------------------- here
>     VMS_ALLOC            = 0x2000,

-- 
Peter Xu


Reply via email to