• Home
  • Raw
  • Download

Lines Matching refs:struct_count

176   inT32 struct_count;            //no of required structs  in alloc_struct()  local
187 struct_count = (count - 1) / sizeof (MEMUNION); in alloc_struct()
188 if (struct_count < MAX_STRUCTS) { in alloc_struct()
192 index = identify_struct_owner (struct_count, name); in alloc_struct()
194 owner_counts[struct_count][index]++; in alloc_struct()
198 returnelement = free_structs[struct_count]; in alloc_struct()
208 element->ptr = struct_blocks[struct_count]; in alloc_struct()
209 struct_blocks[struct_count] = element; in alloc_struct()
210 blocks_in_use[struct_count]++; in alloc_struct()
213 blocksize = STRUCT_BLOCK_SIZE / (struct_count + 1) - 1; in alloc_struct()
217 element->ptr = element + struct_count + 1; in alloc_struct()
218 element += struct_count + 1; in alloc_struct()
223 free_structs[struct_count] = returnelement->ptr; in alloc_struct()
225 structs_in_use[struct_count]++; in alloc_struct()
265 inT32 struct_count; //no of required structs in free_struct() local
275 struct_count = (count - 1) / sizeof (MEMUNION); in free_struct()
282 if (struct_count < MAX_STRUCTS) { in free_struct()
286 index = identify_struct_owner (struct_count, name); in free_struct()
288 owner_counts[struct_count][index]--; in free_struct()
289 ASSERT_HOST (owner_counts[struct_count][index] >= 0); in free_struct()
295 element->ptr = free_structs[struct_count]; in free_struct()
296 free_structs[struct_count] = element; in free_struct()
298 structs_in_use[struct_count]--; in free_struct()
299 if (structs_in_use[struct_count] == 0) { in free_struct()
301 for (element = struct_blocks[struct_count]; in free_struct()
310 struct_blocks[struct_count] = NULL; in free_struct()
312 free_structs[struct_count] = NULL; in free_struct()
313 blocks_in_use[struct_count] = 0; in free_struct()
315 else if (structs_in_use[struct_count] < 0) { in free_struct()
319 else if (structs_in_use[struct_count] < blocks_in_use[struct_count]) { in free_struct()
321 for (block = struct_blocks[struct_count]; in free_struct()
324 index = STRUCT_BLOCK_SIZE / (struct_count + 1) - 1; in free_struct()
326 for (element = free_structs[struct_count]; in free_struct()
335 index = STRUCT_BLOCK_SIZE / (struct_count + 1) - 1; in free_struct()
337 free_structs[struct_count], prev_element = NULL; in free_struct()
344 free_structs[struct_count] = element->ptr; in free_struct()
354 struct_blocks[struct_count] = block->ptr; in free_struct()
356 blocks_in_use[struct_count]--; in free_struct()