Lines Matching full:chunk
62 The way we do this is to take a large chunk, allocating memory from
63 low addresses. When you want to build a symbol in the chunk you just
64 add chars above the current "high water mark" in the chunk. When you
67 Mostly the chars will not burst over the highest address of the chunk,
68 because you would typically expect a chunk to be (say) 100 times as
72 the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
78 When the chars burst over a chunk boundary, we allocate a larger
79 chunk, and then copy the partly formed object from the end of the old
80 chunk to the beginning of the new larger chunk. We then carry on
89 We carve out one object at a time from the current chunk.
143 struct _obstack_chunk /* Lives at front of each chunk. */
145 char *limit; /* 1 past end of this chunk */
146 struct _obstack_chunk *prev; /* address of prior chunk or NULL */
150 struct obstack /* control current object in current chunk */
153 struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
156 char *chunk_limit; /* address of char after current chunk */
168 void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
169 unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
171 chunk contains a zero-length object. This
172 prevents freeing the chunk if we allocate
173 a bigger chunk to replace it. */
189 /* The default name of the function for freeing a chunk is 'obstack_free',
210 because a new chunk might be needed to hold the final size. */
218 /* Pointer to next byte not yet allocated in current chunk. */
294 (__o->chunk->prev == 0 \
295 && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
296 __o->chunk->contents, \
398 if (__o1->next_free - (char *)__o1->chunk \
399 > __o1->chunk_limit - (char *)__o1->chunk) \
408 if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
422 ((h)->chunk->prev == 0 \
423 && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
424 (h)->chunk->contents, \
497 (((h)->next_free - (char *) (h)->chunk \
498 > (h)->chunk_limit - (char *) (h)->chunk) \
504 ( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
506 && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
508 = (h)->temp.tempint + (char *) (h)->chunk) \
509 : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))