comp.lang.ada
 help / color / mirror / Atom feed
From: mdash@sfsup.UUCP
Subject: Re: Problems with creating large number of tasks that utilize re-entrant code
Date: Tue, 10-Mar-87 10:13:08 EST	[thread overview]
Date: Tue Mar 10 10:13:08 1987
Message-ID: <1179@sfsup.UUCP> (raw)
In-Reply-To: 1859@cwruecmp.UUCP

In article <1859@cwruecmp.UUCP> asheem@cwruecmp.UUCP (Asheem Chandna) writes:
>
>Hi,
>
>   Thus we represent the STATION entity by a task type and at
>run time the user enters the number of STATIONS. The stations
>are then created dynamically (using access type pointers to the
>STATION task type).
>
>   The problem that we have is that we are unable to create a
>large number of stations. After creating about 70 STATION tasks
>we get "STORAGE ERROR". However, we seem to have sufficient
>virtual memory allocated plus the paging tables etc. all seem
>to be OK. 
>
>Each station has an access type record that contains it's parameters.
>These parameters are updated by calls on several re-entrant procedures.
>
>   I'd appreciate any help I can get. Also any criticisms relating
>to my methodology of using one task per station and using re-entrant 
>calls for the common code.

I can't see that re-entrant code has anything to do with this problem.
All Ada-generated code that does not reference persistent data should be
re-entrant.

According to the technical summary, VAX Ada allocates a sub-heap (access
collection) for each access type.  So the likely source of your problem is
that you are exhausting this pre-allocated space.  The obvious solution is
to allocate a larger access collection using a length clause for the access
type, i.e.,

	for A_TASK_DECLARATIONS'STORAGE_SIZE use ENOUGH_SPACE;

Of course, this will work only if VAX Ada implements length clauses for
access collections; I don't know offhand whether it does.  See LRM 13.2.

Mike Scheer
AT&T Information Systems, Summit NJ
201-522-6196

      reply	other threads:[~1987-03-10 15:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-03-09 16:57 Problems with creating large number of tasks that utilize re-entrant code asheem
1987-03-10 15:13 ` mdash [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox