C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
_set_new_handler and Memory Models
                                             Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The _set_new_handler function is defined in five different forms
     that allow you to manage the heap for five different memory models:
 
     Prototype                             Purpose
 
     _PNH _set_new_handler( _PNH );        Default new handler
 
     _PNH _set_nnew_handler( _PNH );       Manages the near heap
 
     _PNH _set_fnew_handler( _PNH );       Manages the far heap
 
     _PNHH _set_hnew_handler( _PNHH );     Manages the huge heap
 
     _PNHB _set_bnew_handler( _PNHB );     Manages based heaps
 
     The _set_new_handler function automatically maps to either the
     _set_nnew_handler or the _set_fnew_handler function, depending on
     the default data model.
 
     If the default memory model is either small or medium, you can call
     _set_fnew_handler to manage the far heap. If the default memory
     model is either compact or large, you can call _set_nnew_handler to
     manage the near heap.
     See:  __near, __far
 
     You can explicitly call the _set_hnew_handler and the
     _set_bnew_handler functions to manage both the huge and based
     heaps.
     See: __huge, __based
                                    -♦-