Re: OT: local variables limited in size to (8*1024*1024-32*1024) bytes ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Samstag, 29. November 2008, Stefan Lucke wrote:
> Hi,
>
Hi Stefan!

> the attached program segfaults when using a larger local variable.
>
> Depending on used value I get segfaulst at different locations.
>
> //#define BUFSIZE (9*1024*1024-16*1024) // only segfault
> #define BUFSIZE (8*1024*1024-16*1024) // hello + segfault
> //#define BUFSIZE (8*1024*1024-32*1024) // hello + 2nd line
>
> When using last definition of BUFSIZE every thing is fine.
>

I guess linux has some limit on the stack-size. Sounds like 8MB in your case.
But why can't you just alloc large data on the heap with malloc as everyone 
else does?

Regards
Matthias

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux