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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson) Subject: Re: Unbounded strings (Was: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation)) Date: 1996/11/29 Message-ID: <57lb3t$6r4@mulga.cs.mu.OZ.AU>#1/1 X-Deja-AN: 201309711 references: <325BC3B3.41C6@hso.link.com> <329C945E.6FCB@watson.ibm.com> organization: Comp Sci, University of Melbourne newsgroups: comp.lang.ada Date: 1996-11-29T00:00:00+00:00 List-Id: "Norman H. Cohen" writes: >[...] imagine a producer/consumer design in which the >producer task allocates and initializes an object and passes the access >value pointing to it to the consumer task. The consumer task processes >the object and deallocates it. In your scheme, the producer task will >constantly be requesting more and more storage blocks from the global >heap so that it can chop the blocks up into allocated objects; all of >the allocated objects eventually end up on the consumer task's free >list, but are never used again. You could avoid this by keeping a count of the space in each task's free list: each deallocation would check the amount of free space, and if this is greater than some threshold, return most of the free memory chunks to the global heap. -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.