Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Jonas Maebe
On 12 mrt 2007, at 17:22, Flávio Etrusco wrote: Thanks for your replies, Florian and Jonas. This is very nice! I was shocked and puzzled when I found the GNU libc allocator didn't release VM back to the OS, it's great to confirm you guys are (IMHO ;-) more sane than the gcc and libc folks :-)

Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Flávio Etrusco
Thanks for your replies, Florian and Jonas. This is very nice! I was shocked and puzzled when I found the GNU libc allocator didn't release VM back to the OS, it's great to confirm you guys are (IMHO ;-) more sane than the gcc and libc folks :-) Cheers, Flávio On 3/12/07, Jonas Maebe <[EMAIL PR

Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Jonas Maebe
On 12 mrt 2007, at 16:25, Flávio Etrusco wrote: A slightly related question: does FPC memory manager release unused memory back to the OS? Yes, but not all of it since that causes extreme slowdowns in certain cases (due to constant freeing and reallocating memory to/from the OS). Jonas__

Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Florian Klaempfl
Flávio Etrusco schrieb: > A slightly related question: does FPC memory manager release unused > memory back to the OS? Yes, but it keeps always one block to avoid repeated allocating/releasing. > > Regards, > Flávio > > On 3/12/07, Bram Kuijvenhoven <[EMAIL PROTECTED]> wrote: >> Jason P Sage wro

Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Flávio Etrusco
A slightly related question: does FPC memory manager release unused memory back to the OS? Regards, Flávio On 3/12/07, Bram Kuijvenhoven <[EMAIL PROTECTED]> wrote: Jason P Sage wrote: > MyArray: Array of ansistring; > > There is code I saw that seems to work great using: > > SetLength(MyArray,

Re: [fpc-devel] Array of Ansistring

2007-03-12 Thread Bram Kuijvenhoven
Jason P Sage wrote: MyArray: Array of ansistring; There is code I saw that seems to work great using: SetLength(MyArray,100); Which allows MyArray[100]:='Some ansiString'; Dynamic arrays start at index 0 up to Length-1, so actually this code would corrupt memory ;) (but I assume this is

Re: [fpc-devel] Array of Ansistring

2007-03-11 Thread Marco van de Voort
> Making all the 100 ansistrings in this example set to empty doesn't > Cut it, nor does trying to perform SetLength(MyArray,0); Both are ok. > At least not when I run tests and look at memory in use in the Win32 > Task Manager in XP. That is your problem. To optimize performance, nearly all me

[fpc-devel] Array of Ansistring

2007-03-11 Thread Jason P Sage
Hello All. I saw a great example of using: MyArray: Array of ansistring; There is code I saw that seems to work great using: SetLength(MyArray,100); Which allows MyArray[100]:='Some ansiString'; What I don't know is how to clean this up. Making all the 100 ansistrings in this example set