Bug #305

handle malloc errors

Added by Sig Blips over 3 years ago. Updated over 3 years ago.

Status:Closed Start Date:06/09/2011
Priority:Normal Due date:06/24/2011
Assigned to:Aditya Bhatt % Done:

100%

Category:- Spent time: -
Target version:- Estimated time:2.00 hours

Description

All memory allocation (malloc, calloc, ...) errors should be handled gracefully. Memory allocation failures do happen and the robust handling of system errors is considered good coding technique.

Some functions in the Algorithms project do this but many do not. Example functions that do not handle the memory allocation errors cases: sq_sample(), sq_gen_sine(), and main() in the sqpnm.c file.

History

Updated by Sig Blips over 3 years ago

  • Assigned to set to Aditya Bhatt

Updated by Aditya Bhatt over 3 years ago

  • % Done changed from 0 to 100

Just pushed a bunch of changes - functions now monitor all mallocs for success. Added an error code handler too.
Fixed.

Updated by Aditya Bhatt over 3 years ago

  • Status changed from New to Resolved

Just pushed a bunch of changes - functions now monitor all mallocs for success. Added an error code handler too.
Fixed.

Updated by Aditya Bhatt over 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF