From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!princeton!allegra!ulysses!sfmag!sfsup!mdash From: mdash@sfsup.UUCP Newsgroups: comp.lang.ada Subject: Re: Problems with creating large number of tasks that utilize re-entrant code Message-ID: <1179@sfsup.UUCP> Date: Tue, 10-Mar-87 10:13:08 EST Article-I.D.: sfsup.1179 Posted: Tue Mar 10 10:13:08 1987 Date-Received: Thu, 12-Mar-87 22:52:05 EST References: <1859@cwruecmp.UUCP> Reply-To: mdash@/lang2/mdashUUCP (45415-M.D.Scheer) Organization: AT&T Information Systems Summary: access collections are the problem List-Id: 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