2 ** Copyright 2002, Manuel J. Petit. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
7 #include <sys/syscalls.h>
12 char const * const names
[]=
15 "BEWARE OF THE DUCK!",
17 "I need a girlfriend!",
20 "1.e4 e5 2.Nf3 Nc6 3.Bb5",
23 #define RLD_SCRATCH_SIZE 65536
24 #define RLD_PROGRAM_BASE 0x00200000 /* keep in sync with app ldscript */
28 static region_id rld_region
;
29 static region_id rld_region_2
;
30 static char *rld_base
;
31 static char *rld_base_2
;
37 rld_region
= _kern_vm_create_anonymous_region(
38 (char*)names
[_kern_get_current_proc_id()%(sizeof(names
)/sizeof(names
[0]))],
40 REGION_ADDR_ANY_ADDRESS
,
47 * Fill in the gap upto RLD_PROGRAM_BASE,
49 * NOTE: this will be required only untile the vm finally
50 * support REGION_ADDR_ANY_ABOVE and REGION_ADDR_ANY_BELOW.
51 * Not doing these leads to some funny troubles with some
54 rld_region_2
= _kern_vm_create_anonymous_region(
57 REGION_ADDR_ANY_ADDRESS
,
58 RLD_PROGRAM_BASE
- ((unsigned)(rld_base
+RLD_SCRATCH_SIZE
)),