home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / a / autopcb / !AutoPCB / c / ALLOC next >
Text File  |  1991-03-17  |  314b  |  21 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. char *Alloc( long );
  5. void Nomem( void );
  6.  
  7. char *Alloc ( x ) /* allocate x bytes of far memory */
  8. long x;
  9. {
  10.   char *mem;
  11.  
  12.   mem = (char *)malloc(x);
  13.   return(mem);
  14. }
  15.  
  16. void Nomem ()
  17. { /* a memory allocation request has failed */
  18.   printf( "out of memory\n" );
  19.   exit( -1 );
  20. }
  21.