If the call cannot be satisfied, _sbrk returns -1 and sets the current errno to an appropriate error code. In newlib, errno is part of a structure used to make the library reentrant – this “reent” structure is another large source of memory usage which must be replicated in a multi-threaded environment. An implementation of _sbrk is shown in Listing 15.2