BBS: Inland Empire Archive Date: 05-14-92 (07:54) Number: 129 From: DAVE CLEARY Refer#: NONE To: MATT HART Recvd: NO Subj: Dynamic Arrays?! Conf: (2) Quik_Bas
In a message of <12 May 92 00:06:00>, Matt Hart (1:170/600) writes: >The starting point - VARSEG and VARPTR (S1(0)) should NOT change. >Garbage collection is done with near memory. I've used dynamic >allocation of fixed string arrays and integer arrays, kept the starting >address of the array ONCE in a variable so that it doesn't have to >re-figure it (saves time in a very graphics intensive routine) and pass >that stuff to an assembler routine that bit shifts and scales and finally >prints on the screen. It's never tried to move those starting address. >Garbage collections is STILL done in current MS BASIC compilers, but, as >always, only on dgroup. Garbage collection is done on far memory and dynamic arrays. For instance, say you are allocating and deallocating many dynamic arrays. After a while, far memory will be fragmented. If QB did not do a garbage collection, You could end up with alot of useless memory. I do not know what triggers it. It might be when QB can not allocate an array because of memory fragmentation, or it might be more often than that. Later Dave --- msged 1.99S ZTC * Origin: Home of The QBNews (fidonet.org 1:141/777.1)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET