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-07 01:45:19 PST Date: Mon, 07 Jul 2003 10:44:11 +0200 From: =?ISO-8859-1?Q?Rodrigo_Garc=EDa?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: gnatmem does not work (win2K)? References: <3F0592CB.CD53C24D@konad.de> <3F091BFC.1051E0E3@konad.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: lglpc31.epfl.ch Message-ID: <3f09331a$1@epflnews.epfl.ch> X-Trace: epflnews.epfl.ch 1057567514 128.178.76.8 (7 Jul 2003 10:45:14 +0200) Organization: EPFL Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!news.imp.ch!news.imp.ch!news-zh.switch.ch!switch.ch!epflnews.epfl.ch!not-for-mail Xref: archiver1.google.com comp.lang.ada:40099 Date: 2003-07-07T10:44:11+02:00 List-Id: I tried it on Linux (Red Hat 7.3) and I get the same output as you (instead of the "correct" one from the User's Guide...) I do not have ACT support. If you do, warn them about this issue. Rodrigo Frank Piron wrote: > 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