Re: STRANGE SEGFAULT



El Mar 09 Abr 2002 03:18, Paul Davis escribió:
> >El Mar 09 Abr 2002 01:27, Paul Davis escribió:
> >> >The code "seems" ok, so I have tested diferent solutions, in the last,
> >> > I have decided to lock memory using mlockall(), when using it,
> >> > application runs ok, I have no much experience on direct system call
> >> > programming so I can't understand this segfault.
> >>
> >> if you don't understand this segfault, i suggest you stay away from
> >> mlockall() for a fairly long period of time (units of weeks or
> >> months). mlockall() has absolutely *nothing* to do with your problem.
> >
> >are you sure ??
> >perhaps .... but using it runs ok, and without it no, some sugestion ?
>
> you've prevented page faults from occuring for your program, which
> changes thread timing and other memory-management-related
> behaviour. its not suprising that it changes the visible behaviour.

OK, that's the matter.

>
> >> did you read the FAQ entry about threads? www.gtk.org
> >
> >I'm using pthreads not gthreads. and I understand perfectly the use of
> >pthreads.
>
> it has nothing to do with pthreads versus gthreads. it has do with the
> fact that neither GTK nor GDK nor X Window is thread safe, and unless
> you use mutual exclusion to ensure that only 1 thread is ever calling
> a GTK or GDK or Xlib function at a time, errors like the ones you
> report will be inevitable (and are reported on this list at least once
> every 10 days).

Yes I know, What I did'n know is the relation beetwen threads timming and 
page locking, so let me be surprised by this behaviour change.

Lots of thank's.

:)
>
> --p

-- 
=================
Toni Moreno Giménez
=================
Pje de las rosas  nº 22
Vilassar de Mar 
(Barcelona) España
CP: 08340
-----------------
Tel:937598149
Tel: 699706656
-----------------



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