How is memory management handled in Delphi, exactly? What kind of details can I get about the system, memory-wise, or are those not available? I picked up on using "try finally" and had many struggles in converting Pascal logic to fit within that scheme.
The catch there is that the Delphi logic I do have that is sufficient is about 30X more complex than the Pascal logic was. And I'm still not sure if I have good logic that will cover all of the possible problems & issues. And what of the swap space? How do I know where real memory ends, and the swap file begins on any particular system? There's a performance issue here when a memory alloc gets swap space. Do I need to write a benchmark that every dynamic allocating program uses or is there a way to find out some concrete numbers? Or do I just muddle through, cross my fingers, and hope my program doesn't undergo periodic random crashes because of memory allocation - the only limit being whatever Windows says the program can get (some amount of memory + swap space)?
So can someone give me a good explanation of this and how to do some good memory management?
The catch there is that the Delphi logic I do have that is sufficient is about 30X more complex than the Pascal logic was. And I'm still not sure if I have good logic that will cover all of the possible problems & issues. And what of the swap space? How do I know where real memory ends, and the swap file begins on any particular system? There's a performance issue here when a memory alloc gets swap space. Do I need to write a benchmark that every dynamic allocating program uses or is there a way to find out some concrete numbers? Or do I just muddle through, cross my fingers, and hope my program doesn't undergo periodic random crashes because of memory allocation - the only limit being whatever Windows says the program can get (some amount of memory + swap space)?
So can someone give me a good explanation of this and how to do some good memory management?