* doc/tree.html: Expand tabs.
* include/ec.h: Likewise.
* include/gc_tiny_fl.h: Likewise.
This was contributed by Dave Barrett several years ago.
<PRE>
- Data Structure used by GC_base in gc3.7:
- 21-Apr-94
+ Data Structure used by GC_base in gc3.7:
+ 21-Apr-94
size MININCR * HBLKSIZE bytes as done by gc_scratch_alloc which cannot be
freed; free lists are used (e.g. alloc_hdr). HBLK's below are collected.
- (struct hblk)
+ (struct hblk)
--- +----------------------+ < HBLKSIZE --- --- DISCARD_
^ |garbage[DISCARD_WORDS]| aligned ^ ^ HDR_BYTES WORDS
| | | | v (bytes) (words)
# include "cord.h"
# endif
-/* Extensible cords are strings that may be destructively appended to. */
-/* They allow fast construction of cords from characters that are */
-/* being read from a stream. */
+/* Extensible cords are strings that may be destructively appended to. */
+/* They allow fast construction of cords from characters that are */
+/* being read from a stream. */
/*
* A client might look like:
*
- * {
- * CORD_ec x;
- * CORD result;
- * char c;
- * FILE *f;
+ * {
+ * CORD_ec x;
+ * CORD result;
+ * char c;
+ * FILE *f;
*
- * ...
- * CORD_ec_init(x);
- * while(...) {
- * c = getc(f);
- * ...
- * CORD_ec_append(x, c);
- * }
- * result = CORD_balance(CORD_ec_to_cord(x));
+ * ...
+ * CORD_ec_init(x);
+ * while(...) {
+ * c = getc(f);
+ * ...
+ * CORD_ec_append(x, c);
+ * }
+ * result = CORD_balance(CORD_ec_to_cord(x));
*
* If a C string is desired as the final result, the call to CORD_balance
* may be replaced by a call to CORD_to_char_star.
char ec_buf[CORD_BUFSZ+1];
} CORD_ec[1];
-/* This structure represents the concatenation of ec_cord with */
-/* ec_buf[0 ... (ec_bufptr-ec_buf-1)] */
+/* This structure represents the concatenation of ec_cord with */
+/* ec_buf[0 ... (ec_bufptr-ec_buf-1)] */
-/* Flush the buffer part of the extended chord into ec_cord. */
-/* Note that this is almost the only real function, and it is */
-/* implemented in 6 lines in cordxtra.c */
+/* Flush the buffer part of the extended chord into ec_cord. */
+/* Note that this is almost the only real function, and it is */
+/* implemented in 6 lines in cordxtra.c */
void CORD_ec_flush_buf(CORD_ec x);
/* Convert an extensible cord to a cord. */
/* Initialize an extensible cord. */
# define CORD_ec_init(x) ((x)[0].ec_cord = 0, (x)[0].ec_bufptr = (x)[0].ec_buf)
-/* Append a character to an extensible cord. */
+/* Append a character to an extensible cord. */
# define CORD_ec_append(x, c) \
{ \
- if ((x)[0].ec_bufptr == (x)[0].ec_buf + CORD_BUFSZ) { \
- CORD_ec_flush_buf(x); \
- } \
- *((x)[0].ec_bufptr)++ = (c); \
+ if ((x)[0].ec_bufptr == (x)[0].ec_buf + CORD_BUFSZ) { \
+ CORD_ec_flush_buf(x); \
+ } \
+ *((x)[0].ec_bufptr)++ = (c); \
}
-/* Append a cord to an extensible cord. Structure remains shared with */
-/* original. */
+/* Append a cord to an extensible cord. Structure remains shared with */
+/* original. */
void CORD_ec_append_cord(CORD_ec x, CORD s);
# endif /* EC_H */
*/
#ifndef GC_GRANULE_BYTES
/* GC_GRANULE_BYTES should not be overridden in any instances of the GC */
- /* library that may be shared between applications, since it affects */
- /* the binary interface to the library. */
+ /* library that may be shared between applications, since it affects */
+ /* the binary interface to the library. */
# if defined(__LP64__) || defined (_LP64) || defined(_WIN64) \
- || defined(__s390x__) || defined(__x86_64__) \
- || defined(__alpha__) || defined(__powerpc64__) \
- || defined(__arch64__)
+ || defined(__s390x__) || defined(__x86_64__) \
+ || defined(__alpha__) || defined(__powerpc64__) \
+ || defined(__arch64__)
# define GC_GRANULE_BYTES 16
# define GC_GRANULE_WORDS 2
# else
# define GC_WORDS_TO_GRANULES(n) ((n)*sizeof(void *)/GC_GRANULE_BYTES)
#endif
-/* A "tiny" free list header contains TINY_FREELISTS pointers to */
-/* singly linked lists of objects of different sizes, the ith one */
-/* containing objects i granules in size. Note that there is a list */
-/* of size zero objects. */
+/* A "tiny" free list header contains TINY_FREELISTS pointers to */
+/* singly linked lists of objects of different sizes, the ith one */
+/* containing objects i granules in size. Note that there is a list */
+/* of size zero objects. */
#ifndef GC_TINY_FREELISTS
# if GC_GRANULE_BYTES == 16
# define GC_TINY_FREELISTS 25
# else
-# define GC_TINY_FREELISTS 33 /* Up to and including 256 bytes */
+# define GC_TINY_FREELISTS 33 /* Up to and including 256 bytes */
# endif
#endif /* !GC_TINY_FREELISTS */
-/* The ith free list corresponds to size i*GC_GRANULE_BYTES */
-/* Internally to the collector, the index can be computed with */
-/* ROUNDED_UP_GRANULES. Externally, we don't know whether */
-/* DONT_ADD_BYTE_AT_END is set, but the client should know. */
+/* The ith free list corresponds to size i*GC_GRANULE_BYTES */
+/* Internally to the collector, the index can be computed with */
+/* ROUNDED_UP_GRANULES. Externally, we don't know whether */
+/* DONT_ADD_BYTE_AT_END is set, but the client should know. */
-/* Convert a free list index to the actual size of objects */
-/* on that list, including extra space we added. Not an */
-/* inverse of the above. */
+/* Convert a free list index to the actual size of objects */
+/* on that list, including extra space we added. Not an */
+/* inverse of the above. */
#define GC_RAW_BYTES_FROM_INDEX(i) ((i) * GC_GRANULE_BYTES)
#endif /* GC_TINY_FL_H */