OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [libgloss/] [xc16x/] [sbrk.c] - Blame information for rev 207

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

Line No. Rev Author Line
1 207 jeremybenn
/*
2
 * Copyright (C) 2006 KPIT Cummins
3
 * Copyright (C) 2009 Conny Marco Menebröcker
4
 * All rights reserved.
5
 *
6
 * Redistribution and use in source and binary forms is permitted
7
 * provided that the above copyright notice and following paragraph are
8
 * duplicated in all such forms.
9
 *
10
 * This file is distributed WITHOUT ANY WARRANTY; without even the implied
11
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
 */
13
 
14
#include <_ansi.h>
15
#include <sys/types.h>
16
#include <sys/stat.h>
17
 
18
 char *stack_ptr ;
19
 
20
caddr_t
21
  _sbrk(incr)
22
     int incr;
23
{
24
  extern char end;              /* Defined by the linker */
25
  static char *heap_end=&end;
26
  char *prev_heap_end;
27
 
28
 
29
 
30
  prev_heap_end = heap_end;
31
 
32
 
33
  heap_end += incr;
34
  return (caddr_t)prev_heap_end;
35
}
36
 

powered by: WebSVN 2.1.0

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