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

2012-04-03 Thread Daniel P. Berrange
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 > wrote: > > From: "Daniel P. Berrange" > > > > The red_worker_main method allocates a RedWorker struct instance > > on the stack. This struct is a full 2 MB in size which is n

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

2012-04-03 Thread Daniel P. Berrange
On Tue, Apr 03, 2012 at 11:18:45AM +0300, Alon Levy wrote: > On Mon, Apr 02, 2012 at 12:23:41PM +0100, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > The red_worker_main method allocates a RedWorker struct instance > > on the stack. This struct is a full 2 MB in size which is no

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

2012-04-03 Thread Alon Levy
On Mon, Apr 02, 2012 at 12:23:41PM +0100, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > 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. Why? > > * server/r

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

2012-04-02 Thread Marc-André Lureau
On Mon, Apr 2, 2012 at 1:23 PM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > 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

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

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" 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. * server/red_worker.c: Move RedWorker struct to the heap Signed-off-by: Daniel P. Berrange --- s