A somewhat faithful implementation of libc `malloc`.

        :param sim_size: the amount of memory (in bytes) to be allocated
        :returns:        the address of the allocation, or a NULL pointer if the allocation failed

def malloc(self, sim_size):
        """
        A somewhat faithful implementation of libc `malloc`.

        :param sim_size: the amount of memory (in bytes) to be allocated
        :returns:        the address of the allocation, or a NULL pointer if the allocation failed
        """
        raise NotImplementedError("%s not implemented for %s" % (self.malloc.__func__.__name__,
                                                                 self.__class__.__name__))