1/* 2 * Copyright 2004-2006, Axel D��rfler, axeld@pinc-software.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 7#include <unistd.h> 8#include <errno.h> 9 10#include <errno_private.h> 11 12 13/* in hoard wrapper */ 14extern void *(*sbrk_hook)(long); 15 16 17void * 18sbrk(long increment) 19{ 20 // TODO: we only support extending the heap for now using this method 21 if (increment <= 0) 22 return NULL; 23 24 if (sbrk_hook) 25 return (*sbrk_hook)(increment); 26 27 return NULL; 28} 29