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, MSGID_RANDY,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,325a055bed62c230 X-Google-Attributes: gid103376,public From: reason67@my-deja.com Subject: Re: Apex vs GNAT on solaris Date: 1999/12/07 Message-ID: <82hk18$7up$1@nnrp1.deja.com>#1/1 X-Deja-AN: 557292306 References: <82hiuj$74o$1@nnrp1.deja.com> X-Http-Proxy: NetCache@www-blv-proxy3.boeing.com: Version NetApp Release 3.4D6: Mon Aug 23 16:40:19 PDT 1999-Solaris, 1.0 x24.deja.com:80 (Squid/1.1.22) for client 12.13.226.13 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Dec 07 00:23:08 1999 GMT X-MyDeja-Info: XMYDJUIDreason67 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.06 [en] (X11; I; SunOS 5.6 sun4u) Date: 1999-12-07T00:00:00+00:00 List-Id: > 3.0 mem map of allocation of 1 .. 1 meg of memory keeping 1 > previous allocation -=-=-=-=-=-=-=- with Ada.Text_Io; with Ada.Unchecked_Deallocation; with Common_Utilities; with System; with System.Address_To_Access_Conversions; with System.Storage_Elements; use type System.Storage_Elements.Integer_Address; procedure Aaaa_3_0_Malloc is type Byte is mod 256; subtype Index_Type is Integer range 0 .. 1048476; type Byte_Array_Type is array (Index_Type range <>) of Byte; package Converter is new System.Address_To_Access_Conversions (Byte_Array_Type); procedure Free is new Ada.Unchecked_Deallocation (Byte_Array_Type, Converter.Object_Pointer); Current : Converter.Object_Pointer; Last : Converter.Object_Pointer; -- Address : System.Address; Address : System.Storage_Elements.Integer_Address; File : Ada.Text_Io.File_Type; function Create (Length : in Index_Type) return Converter.Object_Pointer is Result : Converter.Object_Pointer; begin return new Byte_Array_Type (1 .. Length); end Create; begin Ada.Text_Io.Create (File => File, Name => "3.0_malloc_apex"); Current := Create (1); Address := System.Storage_Elements.To_Integer (Converter.To_Address (Current)); Ada.Text_Io.Put_Line (File, "1 " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address)) & " " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address))); Last := Current; Current := Create (2); Address := System.Storage_Elements.To_Integer (Converter.To_Address (Current)); Ada.Text_Io.Put_Line (File, "2 " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address)) & " " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address + 1))); for Index in 3 .. Index_Type'Last loop Free (Last); Last := Current; Current := Create (Index); Address := System.Storage_Elements.To_Integer (Converter.To_Address (Current)); Ada.Text_Io.Put_Line (File, Common_Utilities.Strip_Spaces (Index_Type'Image (Index)) & " " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address)) & " " & Common_Utilities.Strip_Spaces (System.Storage_Elements.Integer_Address'Image (Address + System.Storage_Elements.Integer_Address (Index) - 1))); end loop; Ada.Text_Io.Close (File); end Aaaa_3_0_Malloc; -=-=-=-=-=-=-=-=-=-=- This produces alot of output. I graphed it and found that both Apex and GNAT did a good job of memory management on solaris Sent via Deja.com http://www.deja.com/ Before you buy.