Re: [fpc-pascal] Heavy heap fragmentation issue

2019-06-02 Thread Ryan Joseph
> On Jun 2, 2019, at 2:49 PM, Martok wrote: > > This should be good enough. It's been only used by like four people so the UI > is > a bit of a mess, but you'll only need one button to see the problem. Sorry this is just too much for me to look at without spending considerable time (and I’m

Re: [fpc-pascal] TStringList/pchar question

2019-06-02 Thread Ryan Joseph
> On Jun 2, 2019, at 2:48 PM, Michael Van Canneyt > wrote: > >> I just learned that pchar is not ref counted like I used to think so I’m >> curious why this code doesn’t fail. Shouldn’t this crash because I free >> TStringList and then access GetText? > > You're first doing gettext and then

Re: [fpc-pascal] Heavy heap fragmentation issue

2019-06-02 Thread Martok
>> can you break it down into a test program and post? > > I should probably put the project on Github anyway, it's rather small, and it > shouldn't have any dependencies. Give me an hour to clean it up a bit. This should be good enough. It's been only used by like four people so the UI is a bit o

Re: [fpc-pascal] TStringList/pchar question

2019-06-02 Thread Michael Van Canneyt
On Sun, 2 Jun 2019, Ryan Joseph wrote: I just learned that pchar is not ref counted like I used to think so I’m curious why this code doesn’t fail. Shouldn’t this crash because I free TStringList and then access GetText? You're first doing gettext and then freeing. So this is OK. string

[fpc-pascal] TStringList/pchar question

2019-06-02 Thread Ryan Joseph
I just learned that pchar is not ref counted like I used to think so I’m curious why this code doesn’t fail. Shouldn’t this crash because I free TStringList and then access GetText? strings := TStringList.Create; strings.LoadFromFile(vertexShaderPath); vertexShaderSource := strings.GetText; stri

Re: [fpc-pascal] Heavy heap fragmentation issue

2019-06-02 Thread Martok
> can you break it down into a test program and post? I should probably put the project on Github anyway, it's rather small, and it shouldn't have any dependencies. Give me an hour to clean it up a bit. You'll have to supply your own images though (just copy one 10 times or something), as I don't

Re: [fpc-pascal] Heavy heap fragmentation issue

2019-06-02 Thread Ryan Joseph
> On Jun 2, 2019, at 12:49 PM, Martok wrote: > > Hi all, > > I'm having a problem here in a sequential image processing application that > seems to test a particularly bad operation mode for the RTL heap manager (on > Windows, but I don't think this matters here). > The work load looks like th

[fpc-pascal] Heavy heap fragmentation issue

2019-06-02 Thread Martok
Hi all, I'm having a problem here in a sequential image processing application that seems to test a particularly bad operation mode for the RTL heap manager (on Windows, but I don't think this matters here). The work load looks like this: load "normal sized" image, do some processing, calculate a