Newsgroups: comp.sys.transputer
From: west@emt.e-technik.tu-muenchen.de (Westendorp Robert)
Subject: Re: Dynamic memory allocation in occam?
Organization: TU-Muenchen
Date: Tue, 18 Jan 1994 16:49:12
Message-ID: <west.1.0010D267@emt.e-technik.tu-muenchen.de>

In article <2h1pde$2ts@mail.fwi.uva.nl> robbel@fwi.uva.nl (Robert Belleman) writes:
>Path: regent!lrz-muenchen.de!fauern!xlink.net!howland.reston.ans.net!pipex!uknet!EU.net!sun4nl!fwi.uva.nl!robbel
>From: robbel@fwi.uva.nl (Robert Belleman)
>Newsgroups: comp.sys.transputer
>Subject: Dynamic memory allocation in occam?
>Date: 12 Jan 1994 21:17:34 GMT
>Organization: FWI, University of Amsterdam
>Lines: 24
>Distribution: world
>Message-ID: <2h1pde$2ts@mail.fwi.uva.nl>
>NNTP-Posting-Host: wendy.fwi.uva.nl



>Has anyone ever looked into dynamic memory allocation in Occam?

>Just in case no one has ever implemented this, a related question:
>what would be the best way to figure out how much memory is available
>on a processor and how would one get a "[]INT memory" pointer to it
>(which could then be used by an allocater process)?


My suggestion:

Declare one big array for memory allocation in each node. To ensure, that this 
is the only array in vectorspace - and thus resides at the highest address of 
all variables - you have to put all other arrays in Workspace.
The memory sizes in the .pgm file should be bigger than the physical memory to 
allow the array to be bigger than the memory of any node.
An initialisation routine could then determine the real size of memory and 
restrict memory allocation in the array to valid boundaries.

Im heavily interested in better solutions !

Regards

Robert
west@emt.e-technik.tu-muenchen.de

