OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [m68k/] [fido-sbrk.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#include <stddef.h>
2
 
3
extern char _end[];
4
static char *curbrk = _end;
5
extern char _heapend;   /* End of heap              */
6
 
7
void *
8
sbrk (ptrdiff_t incr)
9
{
10
  char *oldbrk = curbrk;
11
  if (curbrk + incr > &_heapend)
12
    return (void *) -1;
13
  curbrk += incr;
14
  return oldbrk;
15
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.