| | |
| | | |
| | | static int shmid = -1; |
| | | static void *shmp; |
| | | //static int mutex = SemUtil::get(8899, 1); |
| | | static int mutex = SemUtil::get(IPC_PRIVATE, 1); |
| | | static int mutex = SemUtil::get(SHM_MUTEX_KEY, 1); |
| | | //static int mutex = SemUtil::get(IPC_PRIVATE, 1); |
| | | |
| | | static void *mem_start_brk; /* points to first byte of heap */ |
| | | static void *mem_brk; /* points to last byte of heap */ |
| | |
| | | SemUtil::inc(mutex); |
| | | return aptr; |
| | | } else { |
| | | fprintf(stderr, "mm_malloc : out of memery\n"); |
| | | err_exit(0, "mm_malloc : out of memery\n"); |
| | | return NULL; |
| | | } |
| | | |