Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How do I pass free memory to processes via configurer?

6 views
Skip to first unread message

kjr1

unread,
Sep 28, 1994, 7:37:40 AM9/28/94
to

I am trying to pass the free memory on a Transputer to the root process on
that Transputer. This is achieved by the root process having the parameter
[]INT memory. We can then obtain the amount of free memory using the SIZE
operator. I want to do this so that I can use the free memory as a large
buffer. When compiling for the single transputer case, this is not a problem
since the configurer is bypassed and the tools take care of passing in free
memory to the right argument. For example:

PROC root.process(CHAN OF SP fs, ts, []INT memory)
...
:

In fact, non-configured programs let you grab free memory using the above
method by using the environment variable IBOARDSIZE. The `icollect'
tool calculates the free space via ( IBOARDSIZE - ( work.space + code +
vector.space ) ), and passes that to the program as a vector parameter.
However, I am using a transputer network and I do not know how to tell the
configurer to give me free memory via the appropriate argument. This
should be possible on the basis that the memory size of each processor
is declared via `SET (memsize := 4 * M)' or whatever in the .pgm file.

A cut from my pgm configuration file reads thus:

PAR
PROCESSOR pc
#USE "root_cntl.c5h"
root.control(fs, ts, report.to.root[0], pc.id, []INT memory)
PROCESSOR main.pipe[0]
#USE "buff_cntl.c9h"
buffer.control(report.to.0, report.to.root[0], main.pipe.0.id, []INT mem)
.... so on

But of course, on compilation, we get complaints about the undeclared
memory arrays. Declaring the array gives you exactly what you
declare; not the amount of free memory. I am sure there is some kind of
magic keyword that I need, but I cannot find it in my INMOS manuals.
I am aware that using `ilist' can tell me the memory requirements of each
process; calculate the free space on each transputer board and declare
the memory arrays in the root processes. It is, however, painful to
change the array sizes and recompile whenever the program size changes
or I change the boards. Can anybody tell me how to use the configurer?


Thanks in advance for any help,

Kneale J. Rothwell
Research Associate, University of Kent at Canterbury

0 new messages