home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!wupost!zaphod.mps.ohio-state.edu!rpi!losaccom
- From: losaccom@cs.rpi.edu (Mark LoSacco)
- Subject: _new_handler????
- Message-ID: <-l1x0jr@rpi.edu>
- Nntp-Posting-Host: hyades.cs.rpi.edu
- Organization: Rensselaer Polytechnic Institute
- Date: Wed, 29 Jul 1992 20:19:24 GMT
- Lines: 36
-
-
- I was hoping someone here might be able to help me out.
- I am using the latest g++ compiler, and am trying to set the
- supposed system variable "_new_handler" to point to a function
- that will be called whenever an out-of-memory error occurs.
-
- I say supposed because when I try to compile it, I get the
- message: Undefined symbol __new_handler referenced from text
- segment.
-
- My code looks like this...
-
- extern void ( *_new_handler )();
-
- main()
- {
- _new_handler = &out_of_memory;
-
- ...etc
- }
-
- void out_of_memory()
- {
- <print error message & terminate>
- }
-
-
- Since I am following directly from a C++ book I have,
- I suspect that g++ knows this system variable under a
- different name.
-
- Can anybody help me out on this one?
-
- Thanks,
- Mark
- losaccom@cs.rpi.edu
-