Merge remote-tracking branch 'upstream/pr/1203' @ploxiln: "It seems like a bit of refactoring might be able to clean this code up a bit, but it's a bit tricky because of the varied tricky usage of chain structs, so this initial version has minimal changes ... " * upstream/pr/1203: buffer: do not round up allocation for reference-type chain objects