Mail Archives: djgpp/1993/07/17/09:57:22
On 07/16/93 dave AT echologic DOT com (Dave Hayden) wrote:
> I saw your response to my idea of allocating a 2D array by chunks so
> as to minimizes paging. As you point out, this alogrithm still
> depends on the amount of memory available, but I think you're wrong about
> it depending on the malloc algorithm. I envision allocating all the
> space for the array in one malloc() call and just changing the way the
> memory is accessed. If the memory is allocated in one call, the
> malloc algorithm is irrelevant.
You may be correct. I haven't thought through all the ramifications
of this approach yet. It may be completely independent of malloc().
> As I write this, I thought of another tac you could try. After
> allocating the array, scan it once by rows and once by columns, and
> time how long it takes. Then do the same thing with a small portion
> of the array (maybe a 100x100 section). If the times scale roughly,
> then you've probably got the array in memory...
I've thought about timing approaches too. There are a number
of hacks I could use to determine when the system starts
paging. I just wish there was a more straightforward method.
> Thanks for your time. I may toy around with these ideas a little.
> I'll let you know what I find if you're interested.
Thanks for *your* time. I appreciate all the new ideas!
- JW
- Raw text -