C:/Users/Dennis/src/lang/russell.orig/src/gc/real_malloc.c

Go to the documentation of this file.
00001 /* We put this here to minimize the risk of inlining. */
00002 /*VARARGS*/
00003 GC_noop() {}
00004 
00005 # ifdef PCR
00006 /*
00007  * This definition should go in its own file that includes no other
00008  * header files.  Otherwise, we risk not getting the underlying system
00009  * malloc.
00010  */
00011 # define PCR_NO_RENAME
00012 # include <stdlib.h>
00013 
00014 # ifdef __STDC__
00015     char * real_malloc(size_t size)
00016 # else 
00017     char * real_malloc()
00018     int size;
00019 # endif
00020 {
00021     return((char *)malloc(size));
00022 }
00023 #endif /* PCR */
00024 
00025 # ifdef __OS2__
00026 
00027 # include <stddef.h>
00028 # define INCL_DOSMEMMGR
00029 # define INCL_DOSERRORS
00030 # include <os2.h>
00031 
00032 void * os2_alloc(size_t bytes)
00033 {
00034     void * result;
00035 
00036     if (DosAllocMem(&result, bytes, PAG_EXECUTE | PAG_READ |
00037                                     PAG_WRITE | PAG_COMMIT)
00038                     != NO_ERROR) {
00039         return(0);
00040     }
00041     if (result == 0) return(os2_alloc(bytes));
00042     return(result);
00043 }
00044 
00045 # endif /* OS2 */

Generated on Fri Jan 25 10:39:45 2008 for russell by  doxygen 1.5.4