06-06-2025, 01:10 AM
The motivation for me was the ability to do array processing on dynamicall sized blobs of data. I wanted to use MEM blocks the same way Pascal lets you allocate arbitrary sized records by using either arrays or pointers to char/byte lists.
I want to have a record/struct ocontaining a status byte, a size allocated byte, plus the dara. Thinking about it I realized I can bump the data up by two bytes/words and just offset the data by that much. That means I can just pass arrays to/from SUBs/PROCs as needed. I was led to that by the info that you can't (shouldn't?) use arrays in UDTs.
How good is the heap tracking on REDIMed arrays? Do I nee to worry about fragmentation right away? Not sure how smart the back-end C compiler's memory anagementt library is.
I want to have a record/struct ocontaining a status byte, a size allocated byte, plus the dara. Thinking about it I realized I can bump the data up by two bytes/words and just offset the data by that much. That means I can just pass arrays to/from SUBs/PROCs as needed. I was led to that by the info that you can't (shouldn't?) use arrays in UDTs.
How good is the heap tracking on REDIMed arrays? Do I nee to worry about fragmentation right away? Not sure how smart the back-end C compiler's memory anagementt library is.