Catching signal errors
Catching signal errors
- Subject: Catching signal errors
- From: Rick Steele <email@hidden>
- Date: Sat, 5 Feb 2005 17:16:07 -0800
Forgive the ignorance but,
if one has a function like this within an application:
void SumFunction(){
Ptr pPtr = -1L; //create something that will
obviously crash if deferenced
char pSomethingElse;
pSomethingElse = (*pPtr); // Causing the error
}
how would some one catch the signal that would inevitable occur so
the app might be able to close down gracefully?
also does anyone know how to determine the size of a malloc'd object?
ie:
void *pObj = malloc(sizeof(long));
...
long pSizeOfPointer = GetPtrSize(pObj);
--
Best Wishes
Rick Steele
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden