Skip to content

Commit

Permalink
Work on obstack debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Kegler authored and Jeffrey Kegler committed May 29, 2012
1 parent 56e99b0 commit f7be7da
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions r2/libmarpa/dev/marpa_obs.c
Expand Up @@ -69,8 +69,11 @@ enum
};

#define DEBUG_CONTENTS_OFFSET \
offsetof(struct { struct chunk_header header; union worst_aligned_object contents}, \
contents)
offsetof( \
struct { \
struct obstack_chunk_header header; \
union worst_aligned_object contents; \
}, contents)

/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
Objects start on multiples of ALIGNMENT (0 means use default).
Expand All @@ -83,7 +86,7 @@ struct obstack * _marpa_obs_begin ( int size, int alignment)
struct obstack_chunk *chunk; /* points to new chunk */
struct obstack *h; /* points to new obstack */
const int minimum_chunk_size = sizeof(struct obstack_chunk);
/* Just enough room for the obstack header */
/* Just enough room for the chunk and obstack headers */

if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
Expand Down

0 comments on commit f7be7da

Please sign in to comment.