A flexible array member is an incomplete array type declared last in a C99 struct, and it contributes no elements to sizeof, so the struct is sized as if only the other members existed, plus trailing padding to the alignment. Storage is obtained with malloc(sizeof(struct Buf) + n) and the extra bytes are reached through data[0] to data[n-1]. The member must come last, the struct must have at least one other named member, and such a struct cannot be an array element; GNU's zero-length array data[0] is a non-standard cousin that looks the same but is not portable C99.