[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3588.0. "new in signal handler?" by CHEFS::DAVIDSONS () Mon May 26 1997 19:34

    I understand it's not safe to use malloc within a signal handler
    but is it safe to use new within a signal handler?
    
    Thanks,
    	Stuart.
    
    Environment: Digital Unix V3.2D
    
T.RTitleUserPersonal
Name
DateLines
3588.1No!AUSS::BELLCaritas Patiens estTue May 27 1997 00:544
    The default implementation of 'new' calls 'malloc'.
    
Peter.
    
3588.2non malloc new?CHEFS::DAVIDSONSTue May 27 1997 19:266
    Thanks.
    
    Does that imply that there's a version of new which would be safe
    to use in a signal handler?
    
    Stuart.
3588.3Not offhandDECCXX::AMARTINAlan H. MartinTue May 27 1997 20:367
Re .2:

>    Does that imply that there's a version of new which would be safe
>    to use in a signal handler?

Not unless you've written a version of new yourself which is designed to work.
				/AHM
3588.4ThanksCHEFS::DAVIDSONSWed May 28 1997 20:141