The library uses List<byte> buffers and I believe the List<T> default constructor only allocates enough space for 10 entries. Given the size of MMAL buffers and camera frames, we should investigate whether there is any benefit to allocating a much larger size in the constructor.
Edit: Additionally, the default behavior is to double the capacity each time the limit is reached. Each list potentially allocates up to twice as much memory as it actually needs.
The library uses
List<byte>
buffers and I believe theList<T>
default constructor only allocates enough space for 10 entries. Given the size of MMAL buffers and camera frames, we should investigate whether there is any benefit to allocating a much larger size in the constructor.Edit: Additionally, the default behavior is to double the capacity each time the limit is reached. Each list potentially allocates up to twice as much memory as it actually needs.