From owner-freebsd-libh Fri Nov 23 15:57:18 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts7-srv.bellnexxia.net (tomts7.bellnexxia.net [209.226.175.40]) by hub.freebsd.org (Postfix) with ESMTP id DE4A237B42F for ; Fri, 23 Nov 2001 15:57:14 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.177.56]) by tomts7-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011123235713.RBLX9080.tomts7-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Fri, 23 Nov 2001 18:57:13 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 3F5981927; Fri, 23 Nov 2001 18:58:59 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 8903620ADB; Fri, 23 Nov 2001 18:58:43 -0500 (EST) Date: Fri, 23 Nov 2001 18:58:43 -0500 From: The Anarcat To: Libh Cc: Alexander Langer Subject: invalid command name "Database::create" Message-ID: <20011123235842.GA26854@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh , Alexander Langer Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.3.23.2i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all! I am trying to test the latest package stuff here and I kinda stumbled upon a slight problem: shall [libh]$ tclh.static create_db.tcl /tmp/db Error: invalid command name "Database::create" shall [libh]$=20 which generalizes to: music@shall [libh]$ tclh.static=20 % set err [Database "/tmp/db"] invalid command name "Database" %=20 Yuk. Alex, can you reproduce? A. --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: Pour information voir http://www.gnupg.org iEYEARECAAYFAjv+4rEACgkQttcWHAnWiGcY4wCgjBCv3gapudedeKy8bdag5Swy JNQAnA2A6SEbhZus78J1i6xK+hTzq8na =l10C -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Fri Nov 23 16:27:43 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 20B6A37B419 for ; Fri, 23 Nov 2001 16:27:39 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.177.56]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011124002738.MUXP21779.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Fri, 23 Nov 2001 19:27:38 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 587D4192E for ; Fri, 23 Nov 2001 19:29:22 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 88DFF20ADB; Fri, 23 Nov 2001 19:29:06 -0500 (EST) Date: Fri, 23 Nov 2001 19:29:06 -0500 From: The Anarcat To: libh@FreeBSD.org Subject: Does one need to free H:: data structures? (Re: cvs commit: libh/release/diskedit TODO) Message-ID: <20011124002905.GB27297@shall.anarcat.dyndns.org> References: <200111151950.fAFJojw07191@usw4.freebsd.org> <20011115195849.GI2447@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZoaI/ZTpAVc4A5k6" Content-Disposition: inline In-Reply-To: <20011115195849.GI2447@shall.anarcat.dyndns.org> User-Agent: Mutt/1.3.23.2i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --ZoaI/ZTpAVc4A5k6 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu Nov 15, 2001 at 02:58:50PM -0500, The Anarcat wrote: > On Thu Nov 15, 2001 at 01:50:45PM -0600, Antoine Beaupr=E9 wrote: > > antoine 2001/11/15 13:50:45 CST > >=20 > > Modified files: > > release/diskedit TODO=20 >=20 > There is an interesting item in there, to say the least... >=20 > o free data??? >=20 > In libdisk, there are lovely things such as Free_Disk. I never actually > bothered to verify in detail, but I think there is some kind of dynamic > garbage collection in TCL, right? So the question is: >=20 > Do I need to free H:: data structures??? =46rom the tests I ran, yes, you need to free H:: data structures. I don't understand why, and IMHO, it shouldn't be that way, but it's obvious. The test program: set free [lindex $argv 0] set iter [lindex $argv 1] if {$iter =3D=3D ""} {set iter 8} for {set i 0} {$i < $iter} {incr i} { set disk [Disk "ad0"] puts "$i: $disk" if {$free} { H::delete $disk } } puts "done, press enter to finish" gets stdin Yields: anarcat@shall[~/libh]% tclh.static mem-test.tcl 1 8192 0: 0x8882d18_4Disk 1: 0x8882d18_4Disk 2: 0x8882d18_4Disk 3: 0x8882d18_4Disk 4: 0x8882d18_4Disk =2E.. UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27368 27273 84 3 0 9512 2928 ttyin S+ p2 0:20.38 tclh.sta= tic mem-test.tcl 1 8192 and: anarcat@shall[~/libh]% tclh.static mem-test.tcl 0 8192 0: 0x8882d18_4Disk 1: 0x8886118_4Disk 2: 0x88864d8_4Disk 3: 0x8886898_4Disk 4: 0x8886c58_4Disk =2E.. UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27383 27273 128 44 0 19784 12564 - R+ p2 0:26.04 tclh.st= atic mem-test.tcl 0 8192 I guess that settles it. A. --ZoaI/ZTpAVc4A5k6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjv+6dAACgkQttcWHAnWiGcXBACfQT3VjtUx8LcvDrvRy8p0fwPX 56gAn0EcYLLAB9V7S2vGCxvbbOigLuqh =1Hvh -----END PGP SIGNATURE----- --ZoaI/ZTpAVc4A5k6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Fri Nov 23 17:15: 8 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 7FA5537B417 for ; Fri, 23 Nov 2001 17:15:00 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.177.56]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011124011458.NIVM21779.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Fri, 23 Nov 2001 20:14:58 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id CDC8619FE for ; Fri, 23 Nov 2001 20:16:45 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 25E6520ADB; Fri, 23 Nov 2001 20:16:27 -0500 (EST) Date: Fri, 23 Nov 2001 20:16:27 -0500 From: The Anarcat To: Libh Subject: memory management in libh Message-ID: <20011124011627.GC27297@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Libh Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xo44VMWPx7vlQ2+2" Content-Disposition: inline User-Agent: Mutt/1.3.23.2i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --xo44VMWPx7vlQ2+2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Ok. I just discovered that you could and probably must free structures created throught the libh language interface. The problem is that I ran some tests here, and it doesn't seem to be making any effect whatsoever. :) The included patch frees some global structures at appropriate times, that is, when they are initialized and when the editor is closed. However, it doesn't seem to have an effect, on the contrary: # original version anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27625 27273 3 2 0 8780 5012 select S+ p2 0:00.39 tclh.sta= tic disk.tcl anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27625 27273 6 2 0 9040 5288 select S+ p2 0:00.73 tclh.sta= tic disk.tcl anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27625 27273 2 2 0 9108 5340 select S+ p2 0:00.77 tclh.sta= tic disk.tcl anarcat@shall[~/libh]% # ok now let's see the new version anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27636 27273 0 2 0 8776 5008 select S+ p2 0:00.36 tclh.sta= tic disk.tcl anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27636 27273 13 2 0 9036 5284 select S+ p2 0:00.69 tclh.sta= tic disk.tcl anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND 1000 27636 27273 2 2 0 9104 5336 select S+ p2 0:00.73 tclh.sta= tic disk.tcl the 3 runs for each are before, while and after the window is open. We see that on the second run, we have 4 bytes less in memory. However, the lovely thing is that it *starts* with 4 bytes less! So I guess it doesn't change anything. I don't understand. I don't even know if it's worth working on that at all. And what's more, what to do about things that are *not* dialogs and that allow memory? For example, windows are displayed without keeping the control flow, so there is no clear way of cleaning the memory allowed in there apart from the "close callback" which is usually a generic=20 proc button_click_result {$hui button result} { return $result } I am now even more puzzle as of how to deal with libh objects in TCL. Please help. A. Index: disklabel.tcl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/libh/cvs/libh/release/diskedit/disklabel.tcl,v retrieving revision 1.29 diff -u -r1.29 disklabel.tcl --- disklabel.tcl 2001/11/09 19:47:49 1.29 +++ disklabel.tcl 2001/11/24 01:02:33 @@ -17,6 +17,20 @@ source dialogs.tcl source formats.tcl =20 +proc free_list {list} { + + lmap $list "H::delete" + +} + +proc lmap {list procname} { + + set max [llength $list] + for {set i 1} {$i <=3D $max} {incr i} { + $procname [lindex list $i] + } +} + # walk a chunk architecture, exectuting proc on each chunk # XXX: this does not belong here, but more to lib/disk/ # the procedure is called with the chunk arg and a "level" @@ -78,7 +92,14 @@ global parts_list global part_to_disk_list =20 + if [info exists parts_list] { + free_list $parts_list + } set parts_list [list] + =20 + if [info exists parts_to_disk_list] { + free_list $part_to_disk_list + } set part_to_disk_list [list] foreach disk $disk_list { set current_disk $disk @@ -141,7 +162,9 @@ global disk_list =20 # clear the list - # XXX: do we have to free each node???? + if [info exists disk_list] { + free_list $disk_list + } set disk_list [list] =20 # refill everything @@ -180,23 +203,23 @@ set but_cont [$disk_window container "but_cont" "0 0" "horizontal"] =20 set m_buts [$but_cont container "m_buts" "0 0" "vertical"] - $m_buts button "newfs_t_but" "&Newfs Toggle" {parts_callback NEWFS} - $m_buts button "boot_but" "Toggle &Bootable" {parts_callback BOOT} + set b1 [$m_buts button "newfs_t_but" "&Newfs Toggle" {parts_callback NEWFS}] + set b2 [$m_buts button "boot_but" "Toggle &Bootable" {parts_callback BOOT}] # change type? that's a weird idea # let's just assume the user will delete + add instead # in order to have a "change type" button, we'll have to have a=20 # "replace" button and/or function and use it to implement this # $m_buts button "type_but" "Change &Type" {parts_callback TYPE} - $m_buts button "units_but" "Cycle Si&ze Units ($size_units)" {cycle_units_callback ""} - $m_buts button "undo_but" "&Undo changes" {parts_callback UNDO} + set b3 [$m_buts button "units_but" "Cycle Si&ze Units ($size_units)" {cycle_units_callback ""}] + set b4 [$m_buts button "undo_but" "&Undo changes" {parts_callback UNDO}] =20 set r_buts [$but_cont container "r_buts" "0 0" "vertical"] - $r_buts button "add_but" "&Add" {parts_callback ADD} + set b5 [$r_buts button "add_but" "&Add" {parts_callback ADD}] # we postpone this implementation until after primary impl # (add/del) # $r_buts button "res_but" "&Resize" {parts_callback RESIZE} - $r_buts button "del_but" "&Delete" {parts_callback DELETE} - $r_buts button "edit_but" "&Edit" {parts_callback EDIT} - $r_buts button "write_but" "Write Changes" {parts_callback WRITE} + set b6 [$r_buts button "del_but" "&Delete" {parts_callback DELETE}] + set b7 [$r_buts button "edit_but" "&Edit" {parts_callback EDIT}] + set b8 [$r_buts button "write_but" "Write Changes" {parts_callback WRITE}] =20 set b [$disk_window button "qbutton" "&Close" {parts_callback QUIT} "default"] $b resize "3 -1" @@ -207,6 +230,14 @@ =20 $disk_window exec =20 + # free memory + global disk_list parts_list part_to_disk_list + free_list $disk_list + free_list $parts_list + free_list $part_to_disk_list + free_list {$parts $disk_window $but_cont $m_buts $r_buts $b} + free_list {$b1 $b2 $b3 $b4 $b5 $b6 $b7 $b8} + =20 } =20 # --xo44VMWPx7vlQ2+2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjv+9OoACgkQttcWHAnWiGc4JQCcDXOxUU4uaGLQOoxvHJ4eqIrm 0VUAnj4T6ZXf+k+XGRRlprdMOSayM9mt =8OBy -----END PGP SIGNATURE----- --xo44VMWPx7vlQ2+2-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Fri Nov 23 17:24:36 2001 Delivered-To: freebsd-libh@freebsd.org Received: from winston.freebsd.org (adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by hub.freebsd.org (Postfix) with ESMTP id 6320A37B416 for ; Fri, 23 Nov 2001 17:24:29 -0800 (PST) Received: from winston.freebsd.org (jkh@localhost [127.0.0.1]) by winston.freebsd.org (8.11.6/8.11.6) with ESMTP id fAO1OIH59651; Fri, 23 Nov 2001 17:24:18 -0800 (PST) (envelope-from jkh@winston.freebsd.org) To: The Anarcat Cc: Libh Subject: Re: memory management in libh In-Reply-To: Message from The Anarcat of "Fri, 23 Nov 2001 20:16:27 EST." <20011124011627.GC27297@shall.anarcat.dyndns.org> Date: Fri, 23 Nov 2001 17:24:17 -0800 Message-ID: <59647.1006565057@winston.freebsd.org> From: Jordan Hubbard Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG My understanding is that libh objects are garbage-collected via some slick C++ trick that Eugene pulled off, but I don't really know the details, I just remember him going "woohoo!" about it a lot at the time. :) - Jordan > > --xo44VMWPx7vlQ2+2 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > Ok. I just discovered that you could and probably must free structures > created throught the libh language interface. > > The problem is that I ran some tests here, and it doesn't seem to be > making any effect whatsoever. :) > > The included patch frees some global structures at appropriate times, > that is, when they are initialized and when the editor is closed. > However, it doesn't seem to have an effect, on the contrary: > > # original version > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27625 27273 3 2 0 8780 5012 select S+ p2 0:00.39 tclh.sta= > tic disk.tcl > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27625 27273 6 2 0 9040 5288 select S+ p2 0:00.73 tclh.sta= > tic disk.tcl > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27625 27273 2 2 0 9108 5340 select S+ p2 0:00.77 tclh.sta= > tic disk.tcl > anarcat@shall[~/libh]% # ok now let's see the new version > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27636 27273 0 2 0 8776 5008 select S+ p2 0:00.36 tclh.sta= > tic disk.tcl > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27636 27273 13 2 0 9036 5284 select S+ p2 0:00.69 tclh.sta= > tic disk.tcl > anarcat@shall[~/libh]% ps l | egrep 'UID|tcl[h]' > UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND > 1000 27636 27273 2 2 0 9104 5336 select S+ p2 0:00.73 tclh.sta= > tic disk.tcl > > the 3 runs for each are before, while and after the window is open. We > see that on the second run, we have 4 bytes less in memory. However, the > lovely thing is that it *starts* with 4 bytes less! So I guess it > doesn't change anything. > > I don't understand. I don't even know if it's worth working on that at > all. > > And what's more, what to do about things that are *not* dialogs and that > allow memory? For example, windows are displayed without keeping the > control flow, so there is no clear way of cleaning the memory allowed > in there apart from the "close callback" which is usually a generic=20 > > proc button_click_result {$hui button result} { > return $result > } > > I am now even more puzzle as of how to deal with libh objects in TCL. > > Please help. > > A. > > > Index: disklabel.tcl > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/libh/cvs/libh/release/diskedit/disklabel.tcl,v > retrieving revision 1.29 > diff -u -r1.29 disklabel.tcl > --- disklabel.tcl 2001/11/09 19:47:49 1.29 > +++ disklabel.tcl 2001/11/24 01:02:33 > @@ -17,6 +17,20 @@ > source dialogs.tcl > source formats.tcl > =20 > +proc free_list {list} { > + > + lmap $list "H::delete" > + > +} > + > +proc lmap {list procname} { > + > + set max [llength $list] > + for {set i 1} {$i <=3D $max} {incr i} { > + $procname [lindex list $i] > + } > +} > + > # walk a chunk architecture, exectuting proc on each chunk > # XXX: this does not belong here, but more to lib/disk/ > # the procedure is called with the chunk arg and a "level" > @@ -78,7 +92,14 @@ > global parts_list > global part_to_disk_list > =20 > + if [info exists parts_list] { > + free_list $parts_list > + } > set parts_list [list] > + =20 > + if [info exists parts_to_disk_list] { > + free_list $part_to_disk_list > + } > set part_to_disk_list [list] > foreach disk $disk_list { > set current_disk $disk > @@ -141,7 +162,9 @@ > global disk_list > =20 > # clear the list > - # XXX: do we have to free each node???? > + if [info exists disk_list] { > + free_list $disk_list > + } > set disk_list [list] > =20 > # refill everything > @@ -180,23 +203,23 @@ > set but_cont [$disk_window container "but_cont" "0 0" "horizontal"] > =20 > set m_buts [$but_cont container "m_buts" "0 0" "vertical"] > - $m_buts button "newfs_t_but" "&Newfs Toggle" {parts_callback NEWFS} > - $m_buts button "boot_but" "Toggle &Bootable" {parts_callback BOOT} > + set b1 [$m_buts button "newfs_t_but" "&Newfs Toggle" > {parts_callback NEWFS}] > + set b2 [$m_buts button "boot_but" "Toggle &Bootable" > {parts_callback BOOT}] > # change type? that's a weird idea > # let's just assume the user will delete + add instead > # in order to have a "change type" button, we'll have to have a=20 > # "replace" button and/or function and use it to implement this > # $m_buts button "type_but" "Change &Type" {parts_callback TYPE} > - $m_buts button "units_but" "Cycle Si&ze Units ($size_units)" > {cycle_units_callback ""} > - $m_buts button "undo_but" "&Undo changes" {parts_callback UNDO} > + set b3 [$m_buts button "units_but" "Cycle Si&ze Units > ($size_units)" {cycle_units_callback ""}] > + set b4 [$m_buts button "undo_but" "&Undo changes" {parts_callback > UNDO}] > =20 > set r_buts [$but_cont container "r_buts" "0 0" "vertical"] > - $r_buts button "add_but" "&Add" {parts_callback ADD} > + set b5 [$r_buts button "add_but" "&Add" {parts_callback ADD}] > # we postpone this implementation until after primary impl > # (add/del) > # $r_buts button "res_but" "&Resize" {parts_callback RESIZE} > - $r_buts button "del_but" "&Delete" {parts_callback DELETE} > - $r_buts button "edit_but" "&Edit" {parts_callback EDIT} > - $r_buts button "write_but" "Write Changes" {parts_callback WRITE} > + set b6 [$r_buts button "del_but" "&Delete" {parts_callback DELETE}] > + set b7 [$r_buts button "edit_but" "&Edit" {parts_callback EDIT}] > + set b8 [$r_buts button "write_but" "Write Changes" {parts_callback > WRITE}] > =20 > set b [$disk_window button "qbutton" "&Close" {parts_callback QUIT} > "default"] > $b resize "3 -1" > @@ -207,6 +230,14 @@ > =20 > $disk_window exec > =20 > + # free memory > + global disk_list parts_list part_to_disk_list > + free_list $disk_list > + free_list $parts_list > + free_list $part_to_disk_list > + free_list {$parts $disk_window $but_cont $m_buts $r_buts $b} > + free_list {$b1 $b2 $b3 $b4 $b5 $b6 $b7 $b8} > + =20 > } > =20 > # > > > --xo44VMWPx7vlQ2+2 > Content-Type: application/pgp-signature > Content-Disposition: inline > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (FreeBSD) > Comment: For info see http://www.gnupg.org > > iEYEARECAAYFAjv+9OoACgkQttcWHAnWiGc4JQCcDXOxUU4uaGLQOoxvHJ4eqIrm > 0VUAnj4T6ZXf+k+XGRRlprdMOSayM9mt > =8OBy > -----END PGP SIGNATURE----- > > --xo44VMWPx7vlQ2+2-- > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-libh" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Fri Nov 23 17:35: 7 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts10-srv.bellnexxia.net (tomts10.bellnexxia.net [209.226.175.54]) by hub.freebsd.org (Postfix) with ESMTP id B761337B405 for ; Fri, 23 Nov 2001 17:34:53 -0800 (PST) Received: from khan.anarcat.dyndns.org ([65.94.177.56]) by tomts10-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011124013452.RKQT17034.tomts10-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Fri, 23 Nov 2001 20:34:52 -0500 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id DD06C195C; Fri, 23 Nov 2001 20:36:38 -0500 (EST) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id E7C8C20ADB; Fri, 23 Nov 2001 20:36:22 -0500 (EST) Date: Fri, 23 Nov 2001 20:36:22 -0500 From: The Anarcat To: Jordan Hubbard Cc: Libh Subject: Re: memory management in libh Message-ID: <20011124013622.GE27297@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Jordan Hubbard , Libh References: <20011124011627.GC27297@shall.anarcat.dyndns.org> <59647.1006565057@winston.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/2994txjAzEdQwm5" Content-Disposition: inline In-Reply-To: <59647.1006565057@winston.freebsd.org> User-Agent: Mutt/1.3.23.2i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --/2994txjAzEdQwm5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri Nov 23, 2001 at 05:24:17PM -0800, Jordan Hubbard wrote: > My understanding is that libh objects are garbage-collected via some > slick C++ trick that Eugene pulled off, but I don't really know the > details, I just remember him going "woohoo!" about it a lot at the > time. :) hmm... have you read my other post about memory stuff? Subject: Does one need to free H:: data structures? (Re: cvs commit: libh/r= elease/diskedit TODO) Message-ID: <20011124002905.GB27297@shall.anarcat.dyndns.org> It features an interesting test that creates many Disk structures with or without ::delete-ing them. The results are interesting, to say the list. And why does ::delete exists then? A. > > Ok. I just discovered that you could and probably must free structures > > created throught the libh language interface. > >=20 > > The problem is that I ran some tests here, and it doesn't seem to be > > making any effect whatsoever. :) =2E.. --/2994txjAzEdQwm5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjv++ZUACgkQttcWHAnWiGfzBwCfVeo2gaBwlZpAktWqJHVJ4SmW KuIAn1X2zIB4NmjHrpTsUCs2y/74k524 =2p/d -----END PGP SIGNATURE----- --/2994txjAzEdQwm5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sat Nov 24 12:17:12 2001 Delivered-To: freebsd-libh@freebsd.org Received: from icicle.winternet.com (icicle.winternet.com [198.174.169.13]) by hub.freebsd.org (Postfix) with ESMTP id 4DF7337B41D for ; Sat, 24 Nov 2001 12:13:08 -0800 (PST) Received: from tundra.winternet.com (nrahlstr@tundra.winternet.com [198.174.169.11]) by icicle.winternet.com (8.12.1/8.12.1/sci) with ESMTP id fAOKCqAB008917; Sat, 24 Nov 2001 14:12:53 -0600 (CST) SMTP "HELO" (ESMTP) greeting from tundra.winternet.com But _really_ from :: nrahlstr@tundra.winternet.com [198.174.169.11] SMTP "MAIL From:" = nrahlstr@mail.winternet.com (Nathan Ahlstrom) SMTP "RCPT To:" = We have no RCPT Received: (from nrahlstr@localhost) by tundra.winternet.com (8.8.7/8.8.4) id OAA13214; Sat, 24 Nov 2001 14:12:52 -0600 (CST) Date: Sat, 24 Nov 2001 14:12:51 -0600 From: Nathan Ahlstrom To: The Anarcat Cc: Libh , Alexander Langer Subject: Re: invalid command name "Database::create" Message-ID: <20011124141251.A13175@winternet.com> Mail-Followup-To: The Anarcat , Libh , Alexander Langer References: <20011123235842.GA26854@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20011123235842.GA26854@shall.anarcat.dyndns.org>; from anarcat@anarcat.dyndns.org on Fri, Nov 23, 2001 at 06:58:43PM -0500 Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I fixed this a few weeks ago. Make sure you have revision 1.5 of Database.cd.cc. You will probably have to rebuild everything. $FreeBSD: libh/lib/sysinstall/Database.cd.cc,v 1.5 2001/10/20 17:45:30 nra Exp$ The Anarcat wrote: > Hi all! > > I am trying to test the latest package stuff here and I kinda stumbled > upon a slight problem: > > shall [libh]$ tclh.static create_db.tcl /tmp/db > Error: invalid command name "Database::create" > shall [libh]$ > > which generalizes to: > > music@shall [libh]$ tclh.static > % set err [Database "/tmp/db"] > invalid command name "Database" > % > > Yuk. > > Alex, can you reproduce? > > A. > -- Nathan Ahlstrom / nra@NetBSD.org / nra@FreeBSD.org / GPG: 0x67BC9D19 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message