[Bug 691299] API: GstFileMemAllocator - an allocator that uses disk storage to provide memory space

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sat Mar 15 11:30:10 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=691299
  GStreamer | gst-plugins-base | git

Krzysztof Konopko <krzysztof.konopko> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #250246|0                           |1
        is obsolete|                            |

--- Comment #15 from Krzysztof Konopko <krzysztof.konopko at gmail.com> 2014-03-15 18:54:08 UTC ---
Created an attachment (id=272026)
 View: https://bugzilla.gnome.org/attachment.cgi?id=272026
 Review: https://bugzilla.gnome.org/review?bug=691299&attachment=272026

Proposed implementation

Here's my recent attempt to implement the allocator.  This time, as suggested,
I implemented reusing allocated blocks.  Memory blocks can be of any size
(although they are aligned to page size) and are merged when claimed back if
they are continuous.  For example, if the user allocates 2 x 1k, 2k and 1k, and
then deallocated the blocks, they get merged into a single 4k block.

I also replaced awkward API with a single function to create the allocator
which take a file descriptor and the maximum file size (the allocator resizes
the file when created).  The file descriptor gets associated with the allocator
rather than memory (as in dmabuf) because the intention is for a single file to
provide a memory arena where multiple blocks can be requested from.  For this
reason the allocator has to do all the bookkeeping.

Cheers,
Kris

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list