Max out system memory by default

Mon, 14 Jan 2013 09:50:37 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Mon, 14 Jan 2013 09:50:37 +0000
changeset 120
df40e6668a46
parent 119
101fe02456ce
child 121
15ae2788e848

Max out system memory by default

Set the system memory to 2MiB base, 2MiB ext. This is a fully loaded 3B1
motherboard with a RAM expansion board. 512KiB base/no ext is the minimum
which can be specified (e.g. kernel memory map area only) but does not leave
any room for userspace. The kernel doesn't like that and doesn't handle it
gracefully...!

src/main.c file | annotate | diff | revisions
     1.1 diff -r 101fe02456ce -r df40e6668a46 src/main.c
     1.2 --- a/src/main.c	Mon Jan 14 09:48:21 2013 +0000
     1.3 +++ b/src/main.c	Mon Jan 14 09:50:37 2013 +0000
     1.4 @@ -216,7 +216,7 @@
     1.5  	// set up system state
     1.6  	// 512K of RAM
     1.7  	int i;
     1.8 -	if ((i = state_init(512*1024, 512*1024)) != STATE_E_OK) {
     1.9 +	if ((i = state_init(2048*1024, 2048*1024)) != STATE_E_OK) {
    1.10  		fprintf(stderr, "ERROR: Emulator initialisation failed. Error code %d.\n", i);
    1.11  		return i;
    1.12  	}