[Spice-devel] [PATCH spice 06/12] Remove 2 *MB* stack frame in red_worker_main
Daniel P. Berrange
berrange at redhat.com
Tue Apr 3 02:09:54 PDT 2012
On Tue, Apr 03, 2012 at 01:09:09AM +0200, Marc-André Lureau wrote:
> 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.
Yeah, can add a comment just before the abort()
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the Spice-devel
mailing list