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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [libgloss/] [libnosys/] [sbrk.c] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Version of sbrk for no operating system.  */
2
 
3
#include "config.h"
4
#include <_syslist.h>
5
 
6
void *
7
_sbrk (incr)
8
     int incr;
9
{
10
   extern char   end; /* Set by linker.  */
11
   static char * heap_end;
12
   char *        prev_heap_end;
13
 
14
   if (heap_end == 0)
15
     heap_end = & end;
16
 
17
   prev_heap_end = heap_end;
18
   heap_end += incr;
19
 
20
   return (void *) prev_heap_end;
21
}

powered by: WebSVN 2.1.0

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