[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: About memory allocation failures....
From:       Rodolfo Conde Martinez <rcm () gmx ! co ! uk>
Date:       2002-01-29 0:03:08
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 28 January 2002 11:23, Dirk Mueller wrote:
> On Son, 27 Jan 2002, Rodolfo Conde Martinez wrote:
> > 	mmmhh....maybe not exactly....in my kcontrol module i allocate meory for
> > three objects, two QValidator's and a KConfig object, and if the
> > allocation for any of the QValidators fail theres no big trouble, i just
> > dont asign it to the corresponding QLineEdit and thats it, but if the
> > allocation would fail for the KConfig object then the module cant do a
> > thing....what i did was to call qFatal on my app if the allocation for
> > the KConfig fails....
>
> By the time the memory allocation fails the user won't be able to use the
> dialog anyway anymore.
>
> Every X11 event (repaint, mousemove, key press) causes multiple memory
> allocations to happen. So in case you successfully prevented the crash that
> would have happened when assigning a 0 QValidator, you will run a
> millisecond later in an X server crash.
>

	I see....if its so then yes there not really no much you could do....i guess 
then the best you can do is print a message with something like qFatal and 
exit if you cant continue without that allocation.....

	Maybe try to prevent crashes about memory failures would be a good idea like 
some said in other messages....checking a low limit or something....but yes 
to define this "low limit" would be difficult.....i guess we'll sitck with 
the cores files :):).......

	thanks all for your answers....

	Cheers...


>
>
> Dirk
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8Vea/x2Sktruwba0RAkH9AKDYw81VOINuRchG3jlEVJuwTpJLogCgwwrb
FLl8TfEUSaHV+YeKlu3jJIE=
=MpAv
-----END PGP SIGNATURE-----


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic