By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,402 Members | 927 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,402 IT Pros & Developers. It's quick & easy.

esoteric C stuff, what is "debug_flag"??

P: n/a
So I have this code that allocates memory for a struct, by the name of
"instance[tuner]", and then it checks to see if the allocation was
successful -->

if( instance[tuner] == NULL )
{
send_tuner_to_user(tuner) ;
send_string_to_user("ERR:could not malloc instance\r\n") ;
debug_flag |= DFLAG__HEAP_FULL ;
return FALSE ;
}
1.) I was just curious, what is this debug_flag?

2.) How do people customarily use this debug flag thing?

3.) Do they use it similiar to how a C++ exception is used??

Jun 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <11**********************@c74g2000cwc.googlegroups .com>,
syn1kk <Tr*************@gmail.com> wrote:
debug_flag |= DFLAG__HEAP_FULL ; 1.) I was just curious, what is this debug_flag?
A program-specific variable, probably of either file scope or
global scope.

2.) How do people customarily use this debug flag thing?
They don't. The flag is specific to the program, not a standard
C facility.

3.) Do they use it similiar to how a C++ exception is used??


No.
--
"No one has the right to destroy another person's belief by
demanding empirical evidence." -- Ann Landers
Jun 19 '06 #2

P: n/a
Thanks so much. I really appreciate this kind of help.

Have a good day,
Trevor

Jun 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.