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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [libgloss/] [or32/] [sbrk.c] - Diff between revs 197 and 198

Show entire file | Details | Blame | View Log

Rev 197 Rev 198
Line 29... Line 29...
   with Doxygen.                                                              */
   with Doxygen.                                                              */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
 
 
#include <errno.h>
#include <errno.h>
 
 
/*! Reserved stack space inbytes. */
 
#define STACK_BUFFER  65536
 
 
 
/*! Define NULL if not yet defined. */
#undef errno
#ifndef NULL
extern int  errno;
#define NULL ((void *) 0)
 
#endif
#define STACK_BUFFER  65536     /*!< Reserved stack space in bytes. */
 
 
 
 
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/*!Extend the heap
/*!Extend the heap
 
 
Line 71... Line 69...
  extern int  end;              /* start of free memory (as symbol) */
  extern int  end;              /* start of free memory (as symbol) */
 
 
  /* Value set by crt0.S */
  /* Value set by crt0.S */
  extern void *stack;           /* end of free memory */
  extern void *stack;           /* end of free memory */
 
 
  /* The statically held previous end of the stack, with its initialization. */
  /* The statically held previous end of the heap, with its initialization. */
  static void *heap_ptr = (void *)&end;         /* Previous end */
  static void *heap_ptr = (void *)&end;         /* Previous end */
 
 
  if ((stack - (heap_ptr + nbytes)) > STACK_BUFFER )
  if ((stack - (heap_ptr + nbytes)) > STACK_BUFFER )
    {
    {
      void *base  = heap_ptr;
      void *base  = heap_ptr;

powered by: WebSVN 2.1.0

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