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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,96c916e1a76ba9e4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-06 23:06:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!pln-w!extra.newsguy.com!lotsanews.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail From: Frank Piron Newsgroups: comp.lang.ada Subject: Re: gnatmem does not work (win2K)? Date: Mon, 07 Jul 2003 08:06:36 +0100 Organization: KonAd GmbH Message-ID: <3F091BFC.1051E0E3@konad.de> References: <3F0592CB.CD53C24D@konad.de> NNTP-Posting-Host: p508b4050.dip0.t-ipconnect.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: online.de 1057557972 24962 80.139.64.80 (7 Jul 2003 06:06:12 GMT) X-Complaints-To: abuse@einsundeins.com NNTP-Posting-Date: Mon, 7 Jul 2003 06:06:12 +0000 (UTC) X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de,en-US Xref: archiver1.google.com comp.lang.ada:40096 Date: 2003-07-07T08:06:36+01:00 List-Id: Hi, Additionally i tried the example from Gnat User's Guide: ------------------------------------------------------------ with Unchecked_Deallocation; procedure Test_Gm is type T is array (1..1000) of Integer; type Ptr is access T; procedure Free is new Unchecked_Deallocation (T, Ptr); A : Ptr; procedure My_Alloc is begin A := new T; end My_Alloc; procedure My_DeAlloc is B : Ptr := A; begin Free (B); end My_DeAlloc; begin My_Alloc; for I in 1 .. 5 loop for J in I .. 5 loop My_Alloc; end loop; My_Dealloc; end loop; end; ------------------------------------------------------------ I compiled with debugging option -g and after that run > gnatmem test_gm.exe which results in the following output: > Global information ------------------ Total number of allocations : 17 Total number of deallocations : 0 Final Water Mark (non freed mem) : 62.52 Kilobytes High Water Mark : 62.52 Kilobytes Releasing deallocated memory at : -------------------------------- test_gm.adb:17 test_gm.my_dealloc Allocation Root # 1 ------------------- Number of non freed allocations : 16 Final Water Mark (non freed mem) : 62.50 Kilobytes High Water Mark : 62.50 Kilobytes Backtrace : test_gm.adb:11 test_gm.my_alloc Allocation Root # 2 ------------------- Number of non freed allocations : 1 Final Water Mark (non freed mem) : 24 Bytes High Water Mark : 24 Bytes Backtrace : : system__machine_state_operations__allocate_machine_state > OS is win2k. Is this a known behaviour of gnatmem on win32 systems? TIA, Frank