Skip to content

Memory Map

April 25, 2012

I’ve made a few changes to the memory map to tidy things up a bit. The main change is to move fixed areas, such as ROM and video RAM, to virtual addresses so that the space from 0x1100 to 0xFD000 is contiguous for use as a heap by the kernel. This should be plenty of space (don’t they say that about all limits) as kernel heap usage is not that much, and tends to be transitory.

The big consumers of heap memory are the disk buffers, but these use addresses in the data area of the FS task which has plenty of free space. As far as possible all of these fixed limits are specified in memory.h (and memory.inc – I’d love to do away with this file but haven’t yet thought of a way to use the same header for C- and assembler-code) and can be easily redefined there if necessary. There are probably a few absolute references to addresses in the code – I’ll change them if and when I catch them.

I’ve also changed the initial code, in startup.s, to zero all uninitialized kernel data before its first use. It makes sense to know the state of variables before they are used – at least it gives a consistent setup – and zero is a good value to choose. Null pointers show up more readily than ones containing arbitrary values.

All of these changes are reflected in the source code on github, and will make their way onto the website code when I have time. (You can take this sentence to be true for every change that I post about from now on.)

Advertisements

From → IanOS

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: