From a302b48c21aaf08f166b8514705b87f1331c147f Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 19 Jan 2001 01:25:13 +0000 Subject: 2001-01-18 Jeff Johnston * libc/sys/arc/Makefile.am: New file. * libc/sys/arc/Makefile.in: Ditto. * libc/sys/arc/aclocal.m4: Ditto. * libc/sys/arc/configure: Ditto. * libc/sys/arc/configure.in: Ditto. * libc/sys/arc/crt0.S: Ditto. * libc/sys/arc/isatty.c: Ditto. * libc/sys/arc/mem-layout.c: Ditto. * libc/sys/arc/sbrk.c: Ditto. * libc/sys/arc/syscalls.c: Ditto. * libc/sys/arc/sys/syscall.h: Ditto. --- newlib/libc/sys/arc/mem-layout.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 newlib/libc/sys/arc/mem-layout.c (limited to 'newlib/libc/sys/arc/mem-layout.c') diff --git a/newlib/libc/sys/arc/mem-layout.c b/newlib/libc/sys/arc/mem-layout.c new file mode 100644 index 000000000..e9c215220 --- /dev/null +++ b/newlib/libc/sys/arc/mem-layout.c @@ -0,0 +1,21 @@ +/* Ideally this kind of stuff is specified in a linker script. It's not clear + what the default linker script should do, so for now we have this. */ + +/* Keep this file separate from sbrk.c so the programmer can supply his/her + own _sbrk_r. This file could go in crt0.S, but I want to keep this in C. + This is all just an experiment anyway. */ + +#ifndef STACK_SIZE +/* Cache lines recycle at 4096 I think, and 4096 is listed as the page size, + so we make the stack size a multiple of it. Not that it's relevant or + anything, but why not base it on *something*? */ +#define STACK_SIZE (4096 * 4) +#endif + +int stack_size asm ("stack_size") = STACK_SIZE; + +#ifndef SBRK_SIZE +#define SBRK_SIZE (4096 * 32) +#endif + +int sbrk_size asm ("sbrk_size") = SBRK_SIZE; -- cgit v1.2.3