GstMemory Flags

Sebastian Dröge sebastian at
Fri Nov 30 08:53:55 UTC 2018

On Thu, 2018-11-29 at 19:35 -0500, Nicolas Dufresne wrote:
> Le jeu. 29 nov. 2018 15 h 14, Stirling Westrup <swestrup at> a
> écrit :
> > I'm in the middle of implementing a new type of GstMemory and would
> > like some clarification on the intended meaning of the
> > GST_MEMORY_IS_PHYSICALLY_CONTIGUOUS flag. The help text essentially
> > just repeats what the flag already says, and ignores the fact that
> > any
> > piece of allocated memory represented by a single address is
> > NECESSARILY physically contiguous. So the flag appears to be
> > inherently useless (and indeed, it appears completely unused in the
> > gstreamer sources).
> > 
> > My only guess at a likely meaning is that it marks the memory as
> > being
> > part of a larger contiguous piece of allocated memory, but without
> > additional associated information, this would appear to be of no
> > use,
> > especially considering that GstMemory already has a mechanism to
> > handle this very thing, using the size and offset fields.
> > 
> > So, what is the flag intended to indicate?
> It was meant to announce if memory is contiguous in physical memory.
> Information known with NXP Freescale vendoe stack, but not generally
> available for Linux CMA allocation. In general, you should not need
> it.

The important part here is that memory is of course virtually
contiguous when allocated as a single chunk of memory, but how the
pages of the allocation are laid out physically can be completely

Sebastian Dröge, Centricular Ltd ·

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list