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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,6c8d87b37a287813,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: De-serializing and stack sizes Date: Fri, 01 Sep 2006 19:57:55 +0200 Message-ID: <4lrakfF3b2jqU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net Ss1hDtz9gr432Wzl9teP2QRLkm52IkTi4ymjkgj9rxPWWhN6Y= User-Agent: KNode/0.10.4 Xref: g2news2.google.com comp.lang.ada:6440 Date: 2006-09-01T19:57:55+02:00 List-Id: I'm now facing a problem that I don't know how to solve. I'm going to give some thought to it over the week-end and any ideas are welcome. I have some objects that I want to serialize to files. For their creation I use access types so they get created in heap and there's no problem. I simply output them with Item_Type'Output (Stream, Item.all); However, you see the problem, loading them back is a no-no: Item : constant Item_Access := new Item_Type'(Item_Type'Input (Stream)); The 'Input attribute is trying to return the object in the stack and so it doesn't work. My items are around 20 MB in size (now, they could grow bigger) and I'd like not to have to raise my stack to these sizes (also making it doable from the environment task would be a plus). Thanks in advance, A. Mosteo.