#define INIT(this, ...) { (this) = malloc(sizeof(*(this))); \
*(this) = (typeof(*(this))){ __VA_ARGS__ }; }
+/**
+ * Object allocation/initialization macro, with extra allocated bytes at tail.
+ *
+ * The extra space gets zero-initialized.
+ *
+ * @param this pointer to object to allocate memory for
+ * @param extra number of bytes to allocate at end of this
+ * @param ... initializer
+ */
+#define INIT_EXTRA(this, extra, ...) { \
+ typeof(extra) _extra = (extra); \
+ (this) = malloc(sizeof(*(this)) + _extra); \
+ *(this) = (typeof(*(this))){ __VA_ARGS__ }; \
+ memset((this) + 1, 0, _extra); }
+
/**
* Method declaration/definition macro, providing private and public interface.
*