URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
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;
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.