[Spice-devel] [PATCH spice 06/12] Remove 2 *MB* stack frame in red_worker_main

Marc-André Lureau marcandre.lureau at gmail.com
Mon Apr 2 16:09:09 PDT 2012


On Mon, Apr 2, 2012 at 1:23 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> The red_worker_main method allocates a RedWorker struct instance
> on the stack. This struct is a full 2 MB in size which is not
> at all resonable to allocate on the stack.
>

Ouch.. btw, apparently, it's the 10000 RedSurface that take most of
this space (and I think it's worth further investigation)

I assumed you didn't forget the free() but found that the
function/thread never returns. It's a bit choking though, it could be
worth a comment in the code.

-- 
Marc-André Lureau


More information about the Spice-devel mailing list