[JDEV] Segmentation Fault problem

Schuyler Heath sheath at jabber.org
Tue Aug 8 13:36:44 CDT 2000


Hi,

I'm not sure if this is the problem or not, but it's worth a try.  Spawn the
thread with a PTH_ATTR_STACK_SIZE attr, like this:

unsigned int stacksz = 16 * 1024;

  attr = pth_attr_new();
   pth_attr_set(attr, PTH_ATTR_STACK_SIZE,  stacksz);
   pth_spawn(attr, thread_func, NULL);
   pth_attr_destroy(attr);

Schuyler

Kang-pen Chen  wrote:
> 
> I am now writing a simple transport.
> But when I declare a too large array ( about 16 kbytes),
> the segmentation fault always occurs.
> 
> I have a doubt that is a problem with gnu protable thread.
> Have you ever met such kind of problems ?
> 
> Sincerely,
> Kang-pen Chen
> National Taiwan Univ.
> EE Dept.
> 
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
> 
> 






More information about the JDev mailing list