Al's patch sent mon 15 aug.
This commit is contained in:
parent
3e3c3c0b50
commit
b4d4450d2d
1 changed files with 13 additions and 2 deletions
|
@ -136,7 +136,18 @@ int result; /* result of call (usually OK or error #) */
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
PRIVATE void pm_init()
|
PRIVATE void pm_init()
|
||||||
{
|
{
|
||||||
/* Initialize the process manager. */
|
/* Initialize the process manager.
|
||||||
|
* Memory use info is collected from the boot monitor, the kernel, and
|
||||||
|
* all processes compiled into the system image. Initially this information
|
||||||
|
* is put into an array mem_chunks. Elements of mem_chunks are struct memory,
|
||||||
|
* and hold base, size pairs in units of clicks. This array is small, there
|
||||||
|
* should be no more than 8 chunks. After the array of chunks has been built
|
||||||
|
* the contents are used to initialize the hole list. Space for the hole list
|
||||||
|
* is reserved as an array with twice as many elements as the maximum number
|
||||||
|
* of processes allowed. It is managed as a linked list, and elements of the
|
||||||
|
* array are struct hole, which, in addition to storage for a base and size in
|
||||||
|
* click units also contain space for a link, a pointer to another element.
|
||||||
|
*/
|
||||||
int key, i, s;
|
int key, i, s;
|
||||||
static struct boot_image image[NR_BOOT_PROCS];
|
static struct boot_image image[NR_BOOT_PROCS];
|
||||||
register struct boot_image *ip;
|
register struct boot_image *ip;
|
||||||
|
@ -171,9 +182,9 @@ PRIVATE void pm_init()
|
||||||
*/
|
*/
|
||||||
if ((s=sys_getmonparams(monitor_params, sizeof(monitor_params))) != OK)
|
if ((s=sys_getmonparams(monitor_params, sizeof(monitor_params))) != OK)
|
||||||
panic(__FILE__,"get monitor params failed",s);
|
panic(__FILE__,"get monitor params failed",s);
|
||||||
|
get_mem_chunks(mem_chunks);
|
||||||
if ((s=sys_getkinfo(&kinfo)) != OK)
|
if ((s=sys_getkinfo(&kinfo)) != OK)
|
||||||
panic(__FILE__,"get kernel info failed",s);
|
panic(__FILE__,"get kernel info failed",s);
|
||||||
get_mem_chunks(mem_chunks);
|
|
||||||
|
|
||||||
/* Get the memory map of the kernel to see how much memory it uses. */
|
/* Get the memory map of the kernel to see how much memory it uses. */
|
||||||
if ((s=get_mem_map(SYSTASK, mem_map)) != OK)
|
if ((s=get_mem_map(SYSTASK, mem_map)) != OK)
|
||||||
|
|
Loading…
Reference in a new issue