pointers suggestion
- Posted by gertie at visionsix.com Jul 24, 2003
- 460 views
Or: Re: Andy Serpa's memory problem. If Eu had pointers we could optionally use with variable_id, when we knew we were going to grow several sequences at a time, one element at a time, for several megabytes, and then destroy them and recreate them, repeatedly (in other words, we knew what we were doing, and had to do it this way anyhow), we could pull an olde pascal trick (yup, i been looking at my TP code for dos again): <pseudocode> location1 = allocate(8388608) location2 = allocate(8388608) location3 = allocate(8388608) -- location* now holds 8megabytes for themselves -- and they together (possibly) occupy a single block of 24megs sequence var1, var2, var3 fix var1 = location1 fix var2 = location2 fix var3 = location3 Now, Bach/Bliss/Eu can mangle the heck out of var* and not run into garbage collection lag, memory fraging, repeated de/allocations as the var*s grow and collapse, and best of all we know where the vars live. Given how Eu already handles resizing automagically, outgrowing the allocated space could result in simply falling thru to the innate allocation code to grow it bigger, but not smaller. Kat, still using goto still using string execution