Memory allocation Memory allocation and management is a very important topic in multimedia. High definition video uses many magabytes to store one single frame of video. It is important to reuse the memory when possible instead of constantly allocating and freeing the memory. Multimedia systems usually use special purpose chips, such as DSPs or GPUs to perform the heavy lifting (especially for video). These special purpose chips have usually strict requirements for the memory that they can operate on and how the memory is accessed. This chapter talks about the memory management features that &GStreamer; plugins can use. We will first talk about the lowlevel GstMemory object that manages access to a piece of memory. We then continue with GstBuffer that is used to exchange data between plugins (and the application) and that uses GstMemory. We talk about GstMeta that can be placed on buffers to give extra info about the buffer and its memory. For efficiently managing buffers of the same size, we take a look at GstBufferPool. To conclude this chapter we take a look at the GST_QUERY_ALLOCATION query that is used to negotiate memory management options between elements. GstMemory GstBuffer GstMeta GstBufferPool GST_QUERY_ALLOCATION