Files
@ f2c57ce0cd7b
Branch filter:
Location: windsonde/Source/system/_sbrk.c - annotation
f2c57ce0cd7b
372 B
text/plain
Refactor old pressure code and make optional. Fix high power output due to multiple Si446x power definitions
0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 0f04af7169be 2ee6c8e67f32 2ee6c8e67f32 | //
// sbrk: basic implementation of _sbrk for sprintf and other stdlib functions
//
#include <sys/stat.h>
caddr_t _sbrk(int incr)
{
extern char end asm("end");
static char *heap_end;
char *prev_heap_end;
if (heap_end == 0) {
heap_end = &end;
}
prev_heap_end = heap_end;
heap_end += incr;
return (caddr_t)prev_heap_end;
}
// vim:softtabstop=4 shiftwidth=4 expandtab
|