Mercurial > sos > sos
view include/os/memLayout.h @ 150:e72f984619c7
Consolidated a lot of the defines which relate to the memory layout
There is a new file (include/os/memLayout.h) which now includes just
about all the #defines
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Wed, 02 Nov 2011 09:55:09 -0400 |
parents | |
children | 9ad854e6d994 |
line wrap: on
line source
#ifndef __MEMLAYOUT_H #define __MEMLAYOUT_H /* * The following diagram was originally made by Holly and Jeff +----------+ | | | free | | | +----------+ | | 4MB +----------+ at 4MB, growing upward, is the program data/text | | | growing downward, is the program stack. | V | 3.5MB +----------+ at 3.5MB, growing downward, is the program's in-kernel stack | | | | V | +----------+ at 3MB, growing downward, is the program interrupt stack | | | | V | +----------| ~2.5MB | | | free | | | +----------+ | | 1MB +----------+ at 1MB, growing upward, is the shell data/text | | | growing downward, is the shell stack. | V | 512KB +----------+ | | | free | | | 8KB +----------+ |XXXXXXXXXX| The first 8KB are reserved. 0 +----------+ */ #define STACK_SIZE 0x80000 #define PROGRAM_STACK_START 0x400000 #define PROGRAM_TEXT_START 0x400000 #define KERNEL_STACK_START 0x380000 #define PROGINT_STACK_START 0x300000 #define SHELL_STACK_START 0x100000 #define SHELL_TEXT_START 0x100000 //how much room to have between the stack start and the actual start of data #define STACK_SPACING 160 //the size of a filesystem block #define BLOCKSIZE 0x1000 #endif //__MEMLAYOUT_H