home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13426 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.3 KB  |  47 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.dsi.unimi.it!cdc835.cdc.polimi.it!gin503
  3. From: gin503@cdc835.cdc.polimi.it (Maurizio Sartori Masar)
  4. Subject: BC++ far new()
  5. Date: Wed, 9 Sep 1992 13:39:02 GMT
  6. Nntp-Posting-Host: cdc835.cdc.polimi.it
  7. Organization: C.d.C., Politecnico di Milano
  8. Sender: netnews@cdc835.cdc.polimi.it (News Admin)
  9. Message-ID: <gin503.716045942@cdc835>
  10. Lines: 35
  11.  
  12.  
  13. From Borland C++ 3.00 Run Time Library :
  14.  
  15. /* filename - new.cpp */
  16. void *operator new( size_t size );              //    use  malloc(size)
  17.  
  18. /* filename - newf.cpp */
  19. void far * operator new( unsigned long size )   //  use  farmalloc(size)
  20.  
  21. /* filename - CS.LIB */
  22. NEW             size = 83
  23.         operator new(unsigned int)        set_new_handler(void(near*)())
  24.         __new_handler
  25. NEWF            size = 77
  26.         operator new(unsigned long)
  27.  
  28.  
  29.  
  30. Question : how can I call the far version of 'new()' from a small memory
  31.            program ?
  32.  
  33. Note: using long int doesn't work: 
  34.  
  35.         char far * p = new (char[10000L]);
  36.     
  37.  
  38.  
  39.                     Maurizio
  40.  
  41.  
  42. --
  43.   ))    ))    ))      ))))))    ))    )))))))      Maurizio Sartori Masar
  44.   ))))))))  ))  ))   ))))))   ))  ))  ))    ))   gin503@cdc835.cdc.polimi.it
  45.   )) )) )) ))))))))       )) )))))))) ))))))       Politecnico di Milano
  46.   ))    )) ))    ))  ))))))  ))    )) ))    ))            ITALY
  47.