Re: [fpc-pascal] Re: Strange issue with threads

2011-08-23 Thread Werner Van Belle
On 08/23/11 22:46, rzbhatti wrote: > I followed the bug report > http://bugs.freepascal.org/view.php?id=13798 > and it says that it is resolved and closed. > > I am using fpc 2.4.4 on Windows XP. Like Luca Olivetti I am trying to create > 256 threads, but it chocks at 121 saying : Euhm ? You are

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Werner Van Belle
In our previous episode, Graeme Geldenhuys said: >> I personally hate 0-based counting because no >> human counts 0, 1, 2 etc.. >> Well, we once had a prof who counted from 0. After he had drewn a large diagram on the board he wanted to make sure that it was indeed 12 states as stated in the

Re: [fpc-pascal] Where is the best place to declare an array?

2010-05-06 Thread Werner Van Belle
Jonas Maebe wrote: > I don't have the faintest idea why it would be true. I'll explain below > Local variables (including arrays) are allocated on the stack and are > accessed without any kind of indirection (except for dynamic arrays, but the > same goes for globally defined dynamic arrays). T

Re: [fpc-pascal] Where is the best place to declare an array?

2010-05-06 Thread Werner Van Belle
Jonas Maebe wrote: > > On 06 May 2010, at 16:43, Bihar Anwar wrote: > >> If I remember this correctly, I've formerly ever read somewhere (in >> my Delphi days) that array should be declared globally (not inside a >> function or procedure) so that access to the array will be faster. Is >> this corre

Re: [fpc-pascal] Acitve Object Messaging Library

2010-04-05 Thread Werner Van Belle
Michael Van Canneyt wrote: > MPI is for passing messages between parallel running tasks. (the name > means Message Passing Interface) > This is what Active Objects does. > > To me, the difference seems that Active Objects runs within a single > process, and MPI allows to run the tasks in different

Re: [fpc-pascal] Acitve Object Messaging Library

2010-04-05 Thread Werner Van Belle
Michael Van Canneyt wrote: > Hello, > This looks promising. > > Can you explain the similarities and differences with MPI ? That would require me to read up on what MPI is and honoustly, I'm not a big fan on doing that, certainly not after I went to their homepage and saw around 70 lines of contrib

[fpc-pascal] Acitve Object Messaging Library

2010-04-04 Thread Werner Van Belle
Hello, After the couple of questions I had about reference counting and cmpxchg, I can finally share what we have been working on, this would be the eternal gratitude part. A freepascal implementation of active objects. http://werner.yellowcouch.org/Papers/activeobjects/index.html From the abstr

Re: [fpc-pascal] Reference Counting

2010-04-04 Thread Werner Van Belle
Graeme Geldenhuys wrote: >> Test:=nil; >> > > This causes a memory leak - you did not actually free the class > instance. You need to call: Test.Free; > Of course I didn't call free; I was hoping that the reference counter would solve that little problem. If I need to free stuff myself,

[fpc-pascal] Reference Counting

2010-04-03 Thread Werner Van Belle
Hello Dear Freepascal users, I'm a newbee to object pascal. I did however program in turbo pascal. The past couple of days I learned that there exist a variety of classes/object systems in freepascal. Now, I already figured out that the generic class generators are that what we are looking for, wh

Re: [fpc-pascal] Cmpxchg

2010-03-31 Thread Werner Van Belle
Jonas Maebe wrote: > > On 31 Mar 2010, at 16:13, Werner Van Belle wrote: > >> I have been browsing the web somewhat to figure out how I can have >> access to a cmpxchg function in freepascal. At the momente I found very >> little information. Some references on

[fpc-pascal] Cmpxchg

2010-03-31 Thread Werner Van Belle
Hello, I have been browsing the web somewhat to figure out how I can have access to a cmpxchg function in freepascal. At the momente I found very little information. Some references on people arguing that this is unnecessary. Others that it takes too much time etcetera. In any case: I _really_ wan