Commit 06abbb7f07c64e877ffa87ae4614ae5f4e933435

Patrick Steinhardt 2017-03-27T13:14:48

treebuilder: exit early if running OOM in `write_with_buffer` While writing the tree inside of a buffer, we check whether the buffer runs out of memory after each tree entry. While we set the error code as soon as we detect the OOM situation, we happily proceed iterating over the entries. This is not useful at all, as we will try to write into the buffer repeatedly, which cannot work. Fix this by exiting as soon as we are OOM.