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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [newlib-1.18.0/] [libgloss/] [mt/] [sbrk.c] - Blame information for rev 841

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
#include <_ansi.h>
2
#include <sys/types.h>
3
#include <sys/stat.h>
4
#include "trap.h"
5
 
6
 
7
caddr_t
8
sbrk (size_t incr)
9
{
10
  extern char end;              /* Defined by the linker */
11
  static char *heap_end;
12
  char *prev_heap_end;
13
 
14
  char *sp = (char *) &sp;
15
 
16
  if (heap_end == 0)
17
    {
18
      heap_end = &end;
19
    }
20
  prev_heap_end = heap_end;
21
  heap_end += incr;
22
 
23
  return (caddr_t) prev_heap_end;
24
}

powered by: WebSVN 2.1.0

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