Lines Matching refs:chunk

110    a bitmap which marks the start position of each chunk (whether
112 lists and contain a pointer to the next free chunk. Chunks in
135 initialized if the chunk is in the "other" sized free list. Large
383 /* The most recent free chunk is saved here, instead of in the linked
974 struct alloc_chunk *chunk = (struct alloc_chunk *) ptr;
982 VALGRIND_DISCARD (VALGRIND_MAKE_WRITABLE (chunk, sizeof (struct alloc_chunk)));
983 chunk->size = size;
984 chunk->next_free = zone->free_chunks[bin];
990 VALGRIND_DISCARD (VALGRIND_MAKE_WRITABLE (chunk, sizeof (struct alloc_chunk *)));
991 chunk->next_free = zone->free_chunks[bin];
996 zone->free_chunks[bin] = chunk;
1000 fprintf (G.debug_file, "Deallocating object, chunk=%p\n", (void *)chunk);
1003 /* Allocate a chunk of memory of at least ORIG_SIZE bytes, in ZONE. */
1012 struct alloc_chunk *chunk, **pp;
1026 chunk is split, the allocate bit for the new chunk should also be
1034 /* First try to split the last chunk we allocated. For best
1062 && (chunk = zone->free_chunks[bin]) != NULL)
1064 /* We have a chunk of the right size. Pull it off the free list
1067 zone->free_chunks[bin] = chunk->next_free;
1071 result = chunk;
1074 may now be wrong, if this was the last chunk in the high bin.
1081 /* Next, if there wasn't a chunk of the ideal size, look for a chunk
1083 sized bin with a chunk in it. Try the largest normal-sized bin
1097 chunk = zone->free_chunks[tbin];
1099 /* Remove the chunk from its previous bin. */
1100 zone->free_chunks[tbin] = chunk->next_free;
1102 result = (char *) chunk;
1104 /* Save the rest of the chunk for future allocation. */
1108 chunk = (struct alloc_chunk *) ((char *) result + size);
1109 zone->cached_free = (char *) chunk;
1112 /* Mark the new free chunk as an object, so that we can
1114 zone_set_object_alloc_bit (chunk);
1117 chunk in the high bin. Rather than fixing it up now,
1124 /* Failing that, look through the "other" bucket for a chunk
1127 chunk = *pp;
1128 while (chunk && chunk->size < size)
1130 pp = &chunk->next_free;
1131 chunk = *pp;
1134 if (chunk)
1136 /* Remove the chunk from its previous bin. */
1137 *pp = chunk->next_free;
1139 result = (char *) chunk;
1141 /* Save the rest of the chunk for future allocation, if there's any
1143 csize = chunk->size;
1149 chunk = (struct alloc_chunk *) ((char *) result + size);
1150 zone->cached_free = (char *) chunk;
1153 /* Mark the new free chunk as an object. */
1154 zone_set_object_alloc_bit (chunk);
1189 /* Mark the first chunk in the new page. */
1201 /* Mark the new free chunk as an object. */
1207 /* We could save TYPE in the chunk, but we don't use that for
1209 either before the beginning of the chunk or after its end,
1269 /* Allocate a SIZE of chunk memory of GTE type, into an appropriate zone
1300 /* Poison the chunk. */
1354 /* Add the chunk to the free list. We don't bother with coalescing,
1355 since we are likely to want a chunk of this size again. */
1780 struct alloc_chunk *chunk;
1785 chunk = zone->free_chunks[i];
1786 while (chunk)
1789 tot += chunk->size;
1790 chunk = chunk->next_free;
2023 struct alloc_chunk *chunk = zone->free_chunks[i];
2024 while (chunk)
2026 in_use -= ggc_get_size (chunk);
2027 chunk = chunk->next_free;
2344 /* Clear the zone's free chunk list. */