HEAP LBSM_Shmem_Create(void) { int/*bool*/ one = 0/*false*/, two = 0/*false*/; HEAP heap = 0; size_t i; for (i = 0; i < 2; i++) s_Shmid[i] = shmget(k_ShmemKey[i], 0, 0); if ((one = (s_Shmid[0] >= 0)) | (two = (s_Shmid[1] >= 0))) { CORE_LOGF_X(13, eLOG_Warning, ("Re-creating existing LBSM shmem segment%s %s%s%s", one ^ two ? "" : "s", one ? "[1]" : "", one ^ two ? "" : " and ", two ? "[2]" : "")); LBSM_Shmem_Destroy(0); } if (!(i = CORE_GetVMPageSize())) i = 4096; heap = HEAP_Create(0, 0, i, s_LBSM_ExpandHeap, 0); return heap; }
static void TEST_CORE_GetVMPageSize(void) { printf("PageSize = %d\n", (int) CORE_GetVMPageSize()); }