Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
On Fri, Oct 8, 2010 at 3:37 PM, Marco van de Voort wrote: > No, but the last one might be set before the condition coupled to that last > one might be carried out. See Jonas' example. The ONLY way that could happen is if the boolean happens to be set in a worker thread's method that still has mor

Re: [fpc-pascal] Where is IsMultiThreaded set under Linux?

2010-10-08 Thread Andrew Brunner
n Fri, Oct 8, 2010 at 3:52 PM, Jonas Maebe wrote: > > On 08 Oct 2010, at 22:45, Andrew Brunner wrote: > > On Fri, Oct 8, 2010 at 3:37 PM, Marco van de Voort wrote: > > No, but the last one might be set before the condition coupled to that last > > one might be carried out. See

Re: [fpc-pascal] Help getting Lazarus app in Ubuntu to elevate to root and back again

2010-10-11 Thread Andrew Brunner
On Sun, Oct 10, 2010 at 1:09 PM, Mark Morgan Lloyd wrote: > Could you suid it to root or to an appropriate group? I've not tried this > for a Pascal/Lazarus program and don't know what the precise rules are for > port usage (i.e. whether the user has to be root or using the root group is > suffici

Re: [fpc-pascal] Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
2010 00:51, schrieb Andrew Brunner: >> >> This test case illustrates a FPC memory leak. > > What makes you think so? Internally freed memory is not immediatly > released to the OS as well. On windows I know there is a call to flush all virtual memory out. Is the

[fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
On Tue, Oct 12, 2010 at 5:51 PM, Andrew Brunner wrote: Another problem demonstrated with this application is the limiting factor of thread creation. I'd like to make a complaint using this code as well. Change the number of threads to 3000. The system gets to about 1,000 and starts to

Re: [fpc-pascal] Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
On Wed, Oct 13, 2010 at 8:27 AM, Jonas Maebe wrote: > > 1) on entry of the "critical section" protected by this variable, you can > have problems, because this sequence: > > locked:=true; > local:=shared_global_var; > > may actually be executed in this order: > > local:=shared_global_var; > locked

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
On Wed, Oct 13, 2010 at 8:28 AM, Michael Van Canneyt wrote: > Probably because it uses a heap manager per thread. > > You may try to use 'cmem', which will replace the heap manager with the C > memory manager (one for the whole app, not per thread). That will allow you > to test this hypothesis.

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
On Wed, Oct 13, 2010 at 2:12 PM, Michael Van Canneyt wrote: > FPC doesn't have anything to say about CPU allocation. The threads are > created by the C pthread library and Linux kernel. > They do the heavy work. Is it possible I have the pthread library in some sort of debug mode that is slowing

[fpc-pascal] Building FPC with debug information

2010-10-13 Thread Andrew Brunner
I was reading on building FPC with debug enabled so I can trace into a unit and found that it was way too difficult to find the parameters. I know I had at one time edited the wiki page once I learned how to do it but to my surprise that info was either lost/moved or too hard to navigate and the se

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-13 Thread Andrew Brunner
On Wed, Oct 13, 2010 at 3:24 PM, Michael Van Canneyt wrote: >> Is it possible I have the pthread library in some sort of debug mode >> that is slowing down the process of thread creation? > > I seriously doubt it. > What you could do to test, is write your program using direct Pthread calls. > Th

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-14 Thread Andrew Brunner
On Thu, Oct 14, 2010 at 4:29 AM, Michael Van Canneyt wrote: > Impressive. So the FPC implementation on top of this obviously does > something on top of this which causes it to slow down. > > Possible culprits would then be the semaphores and TLS allocation. I obtained the source to pThreads syst

Re: [fpc-pascal] Building FPC with debug information

2010-10-14 Thread Andrew Brunner
Thanks, Jonas. On Thu, Oct 14, 2010 at 6:43 AM, Jonas Maebe wrote: > > On 14 Oct 2010, at 02:58, Andrew Brunner wrote: > >> I was reading on building FPC with debug enabled so I can trace into a >> unit > > make OPT=&q

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-14 Thread Andrew Brunner
> What are the exact differences from this test to your last one? Would be > nice to know that... :) Every barrier causes a significant increase in time. In high performance parallel computing time is something we minimize. Big reductions in linear execution yield massive performance gains in th

Re: [fpc-pascal] What are the issues involved in threads sharing variables?

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 5:20 AM, Frank Church wrote: > > I am writing an app involving 2 threads, and a timer loop in the UI. > > The first thread monitors network events, logs them into a database, appends > them to a list. > Any time I see append to a list I always think "RTLCriticalSection" >

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 9:24 AM, Jonas Maebe wrote: > You replaced a bunch of semaphore create/lock/unlock/destroy operations with > calls to a function that does not do anything. I did not. I REMOVED create/destroy/lock/unlock. I ADDED calls to the ThreadManager's own functions for thread Resu

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 9:24 AM, Michael Van Canneyt wrote: > > Thank you, > > I'll study it to see if/how we can do something to increase speed of > creating threads > in FPC. > > But if I understand you correctly, the WRITE_MEMORY_BARRIER() call is > beyond our reach, so there's little we can do

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 9:55 AM, Sven Barth wrote: > Am 15.10.2010 16:31, schrieb Andrew Brunner: >> >> On Fri, Oct 15, 2010 at 9:24 AM, Jonas Maebe >>  wrote: >>> >>> You replaced a bunch of semaphore create/lock/unlock/destroy operations >>&g

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 10:06 AM, Jonas Maebe wrote: > First of all, if you use tthread.create(true) (i.e., create a suspended > thread), then the "execute" method will never be called: BTW: I did notice that the semaphore was being used to suspend the thread. And I also know that that was it's

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 10:24 AM, Sven Barth wrote: > The problem isn't the pthreads library. The problem is the POSIX threading > specification of which pthreads is an implementation (look at the comment in > CSuspendThread again). POSIX is just like you say a specification. Suspend and Resume

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 10:57 AM, Vinzent Höfler wrote: > If you access it inside the execute method, you more or > less crash (or at least leak memory). You obviously had a problem with access ThreadID before it was assigned. Accessing it should not arrive at a RAV. I'm not sure this is on top

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 10:57 AM, Vinzent Höfler wrote: > > Huh? Why should the pthreads library have a semaphore or similar on each > thread? Good question. And according to pThreads source comments they themselves did unwillingly. ___ fpc-pascal mail

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 11:03 AM, wrote: > On Fri, 15 Oct 2010 17:24:03 +0200, Sven Barth > wrote: > >> The problem isn't the pthreads library. The problem is the POSIX threading >> specification of which pthreads is an implementation (look at the comment in >> CSuspendThread again). > > Actuall

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-15 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 12:01 PM, Vinzent Höfler wrote: >> Exactly.  It was poor implementation.  You should have had a global >> barrier onExecute.  That would unlock the thread after everything you >> needed was readable. > > If it's global, it would unlock *any* thread at that time. Yes, belo

[fpc-pascal] FPC for High Performance Computing (HPC) Components with Application API

2010-10-15 Thread Andrew Brunner
I wanted to start a discussion based on current state of FPC and High Performance Computing (HPC). The premise of the thread is to discuss high scale threads. Currently FPC has matured to the point where it might be beneficial to start targeting a particular market for users. The first thing tha

Re: [fpc-pascal] FPC for High Performance Computing (HPC) Components with Application API

2010-10-15 Thread Andrew Brunner
:24, Andrew Brunner wrote: >> Suggested Reading: >>   http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.6.tar.gz > > Why would you want to look at this?  It's not used any more (except > for really old kernels). > > Henry > ___

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-16 Thread Andrew Brunner
On Sat, Oct 16, 2010 at 7:04 AM, Jonas Maebe wrote: > He cannot. If freeonterminate=true, then even if you call "inherited > create(false)" as the very last statement of your constructor, the thread > may already have finished running and freed itself before AfterConstruction > is called. The Aft

Re: [fpc-pascal] FPC for High Performance Computing (HPC) Components with Application API

2010-10-16 Thread Andrew Brunner
On Fri, Oct 15, 2010 at 5:10 PM, Henry Vermaak wrote: > I've told you before: NPTL is part of the glibc sources.  Download the > latest glibc sources and look in the nptl directory.  The latest glibc > release is 2.11.2. FPC source to cThreads unit and the thread manager associated with threadin

Re: [fpc-pascal] FPC for High Performance Computing (HPC) Components with Application API

2010-10-16 Thread Andrew Brunner
On Sat, Oct 16, 2010 at 2:16 PM, Henry Vermaak wrote: > libpthread.so is the name of the library, not the name of the implementation. I updated FPC from SVN and it is pointing to this library now :-). Only problem is someone took some changes I made to remove semaphore on thread creation... If I

Re: [fpc-pascal] Re: Multi-threaded project with few locks (no Thread.waitfor). Memory consumption keeps increasing on Ubuntu 10.10 x64

2010-10-16 Thread Andrew Brunner
On Sat, Oct 16, 2010 at 2:16 PM, Michael Van Canneyt wrote: > It would allow me to write programs that are multithreaded and don't use > external libs. Right. Every interface between the kernel space and user space add at least one degree of inefficiency. So every FPC program would be carrying

[fpc-pascal] Problem accessing Class Method with abstraction

2010-10-16 Thread Andrew Brunner
I've got a class factory problem I'm trying to resolve and it appears I'm at a point where it's probably better to ask for help. TCoreObjects=class; TCoreObject=Class (TPersistent) protected class procedure VerifyIDs(var Module:TDBMSModule); Virtual; abstract; end; TAdminCore=Class(T

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Andrew Brunner
On Sun, Oct 17, 2010 at 3:33 AM, Michael Van Canneyt wrote: // Revised code CCoreObject=Class(TCoreObject); TCoreObjects=class; TCoreObject=Class (TPersistent)  protected   class procedure VerifyIDs(var Module:TDBMSModule); Virtual; abstract;  end;  TAdminCore=Class(TCoreObject)  protected

Re: [fpc-pascal] Problem accessing Class Method with abstraction

2010-10-17 Thread Andrew Brunner
procedure VerifyIDs(Var Module:TDBMSModule); var iLcv:integer; ItemP:PCoreObjectItem; coGeneric:TPersistentClass; coItem:TCoreObject; begin for iLcv:=0 to High(CoreObjectItems) do begin ItemP:=CoreObjectItems[iLcv]; coGeneric:=GetClass(ItemP^.ClassName); if (coGeneric<>nil) an

Re: [fpc-pascal] Building FPC with debug information

2010-10-20 Thread Andrew Brunner
Yes. It's what I saw. I was still able to trace database components line by line using Lazarus and GDB though. On Wed, Oct 20, 2010 at 12:54 PM, Brian Winfrey wrote: >> make OPT="-O-" DEBUG=1 all > > When I ran this I see that both -dDEBUG and -dRELEASE are passed on > the fpc command line.  Is

[fpc-pascal] PostgreSQL 8.4 Ubuntu 10.10 x64

2010-10-21 Thread Andrew Brunner
I've got a problem with the PostgreSQL component. I've got an insert statement with int64 values. The prepare command goes through but the server denies the entire packet with the string value of the int64 is too large for integer type error. The fields were all declared as bigint and the parame

Re: [fpc-pascal] Re: PostgreSQL 8.4 Ubuntu 10.10 x64

2010-10-22 Thread Andrew Brunner
On Fri, Oct 22, 2010 at 2:44 AM, Martin Schreiber wrote: > The problem is in TypeStrings, ftLargeInt should return 'bigint' instead > of 'int'. Fixed in MSEide+MSEgui trunk 4028. > http://developer.berlios.de/svn/?group_id=11520 Thanks Martin! > Interresting, MSEgui is used in production since y

Re: [fpc-pascal] Leak narrowed down

2010-10-28 Thread Andrew Brunner
>> Then, once the program is running and has leaked memory, run >> leaks nameofyourprogram > > Thanks for this tip! It is very interesting, however in this situation > it does not detect the lost memory. > > At this point I have to give up on GetTextWidth - I will avoid it for > now. Maybe next yea

[fpc-pascal] Cannot build FPC from SVN

2010-11-29 Thread Andrew Brunner
svn 1645 FE. -FU/Developer/Source/Compilers/FPC/rtl/units/x86_64-linux -Cg -dx86_64 -dRELEASE ../objpas/fgl.pp fgl.pp(128,38) Error: Generics without specialization cannot be used as a type for a variable This has been stopping the build process for a few days now. Anyone know about it or is thi

Re: [fpc-pascal] Cannot build FPC from SVN

2010-11-29 Thread Andrew Brunner
[options] I'll go read that thread... On Mon, Nov 29, 2010 at 8:15 AM, Jonas Maebe wrote: > > On 29 Nov 2010, at 15:09, Andrew Brunner wrote: > > FE. -FU/Developer/Source/Compilers/FPC/rtl/units/x86_64-linux -Cg -dx86_64 >> -dRELEASE ../objpas/fgl.pp >> fgl.pp(128,

Re: [fpc-pascal] Cannot build FPC from SVN

2010-11-29 Thread Andrew Brunner
Bootstrapping from Ubuntu 10.10 and rebuilding from SVN got past the problem. I guess that an evolutionary dead end with some bad revision caused this problem... Anyways. I'm back up and running. On Mon, Nov 29, 2010 at 8:15 AM, Jonas Maebe wrote: > > On 29 Nov 2010, at 15:09, And

[fpc-pascal] Pascal Scripting Engines

2010-12-10 Thread Andrew Brunner
Hi there, I'm considering pascal scripting engines in stead of hot-swaped compiled stored objects/dlls for server back-end development for clients (namely WebSocket/JS). I came across a few relatively recent solutions and wanted to know if there are any obscure "light weight" scripting engines bu

Re: [fpc-pascal] Pascal Scripting Engines

2010-12-10 Thread Andrew Brunner
; Now it would be easier. > > 2010/12/10 Andrew Brunner : > > Hi there, > > > > I'm considering pascal scripting engines in stead of hot-swaped compiled > > stored objects/dlls for server back-end development for clients (namely > > WebSocket/JS). I came acr

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
On Mon, Feb 7, 2011 at 7:35 AM, wrote: > A cross-platform solution is to use one of libsee or BESEN. > > The latter is implemented in 100% native Object Pascal. > > Michael. BESEN is very, very, very well written but I can't seem to get any indication how to use it in my project. I would love

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
On Mon, Feb 7, 2011 at 10:39 AM, Brian Winfrey wrote: > > I have some interest in exploring javascript implementations for fpc. > http://code.google.com/p/fpcjs/  -- Is this comparable to what you have noted? Actually fpcjs is the first project that I, (myself), have seen that addresses the gatew

Re: [fpc-pascal] Javascript in Desktop Applications

2011-02-07 Thread Andrew Brunner
Hmmm... Mozilla is open source... :-) We are free to port the Scripting Engine to Pascal as long as we have the source? no? On Mon, Feb 7, 2011 at 11:31 AM, Michael Van Canneyt wrote: > No, that project embeds mozilla in FPC. ___ fpc-pascal maillist

Re: [fpc-pascal] web app and application persistency

2011-08-01 Thread Andrew Brunner
On Mon, Aug 1, 2011 at 10:07 AM, Gustavo Enrique Jimenez wrote: > Hi: > >  I send cookies to the client. One of those cookies is a "sessionID", > a random number generated at login. >  My sequence is something like > > Login > Client: username/password ->Login html button > Server: run cgi app wit

Re: [fpc-pascal] web app and application persistency

2011-08-01 Thread Andrew Brunner
On Mon, Aug 1, 2011 at 10:43 AM, Felipe Monteiro de Carvalho wrote: > On Mon, Aug 1, 2011 at 5:23 PM, Andrew Brunner > wrote: >> I agree with this one.  The only thing I could add would be AJAX & >> WebSockets for really advanced applications. > > Do WebSockets

Re: [fpc-pascal] web app and application persistency

2011-08-01 Thread Andrew Brunner
On Mon, Aug 1, 2011 at 12:05 PM, Michael Van Canneyt wrote: > ..But it is not always supported by the browser (as Marco indicated) > and many firewalls simply don't agree with websockets. > Can firewalls detect websockets over port 80? ___ fpc-pascal m

Re: [fpc-pascal] web app and application persistency

2011-08-01 Thread Andrew Brunner
The only thing I can think of would be packet inspection. Firewalls included with Linux and Windows do not perform "deep" packet inspection. They only allow/deny packets with specific ports over either TCP or UDP. Am I missing something? On Mon, Aug 1, 2011 at 12:31 PM, Michael Van Canneyt wro

[fpc-pascal] Distributing unit object files

2011-12-15 Thread Andrew Brunner
I'm needing to figure out how best to "close" or "seal" units so that I can use the compiled unit object files instead of the actual unit files. The problem is that the compiled unit files call a few units that the project has the source to. And FPC is looking to recompile the compiled object fil

[fpc-pascal] Darwin i386 socket polling

2011-12-22 Thread Andrew Brunner
I'm needing to figure out how socket signaling mechanisms work under darwin. Windows and Linux work, Darwin however does not support ePoll. Anyone have any experience with Sockets events under OSX i386? Thanks. ___ fpc-pascal maillist - fpc-pascal@li

Re: [fpc-pascal] Darwin i386 socket polling

2011-12-23 Thread Andrew Brunner
> Windows supports epoll? No, windows doesn't offer polling socket mechanisms. They send messages to windows with the socket number - it's event driven. Kernel polling is different, but I assumed that Darwin would support it via e-Poll. I searched and found a few references to kQueue/kEvent. Th

[fpc-pascal] Looking for JavaScript component on FPC

2015-03-31 Thread Andrew Brunner
I am trying to integrate javascript for back-end support of cloud apps. I noticed the fcl-js package. Does anyone have an idea when we can expect to have a component suite much like the PascalScript? Thanks, -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a

Re: [fpc-pascal] Looking for JavaScript component on FPC

2015-04-01 Thread Andrew Brunner
h. I would be ideal to offer developers a choice of which scripting language they want to write back-end code. But if I am to provide developers with instant API to do complex code that is relevant to computing needs of today, I will need access to nested objects in either of these JITCs.

Re: [fpc-pascal] Looking for JavaScript component on FPC

2015-04-02 Thread Andrew Brunner
On 4/2/2015 2:24 AM, Michael Van Canneyt wrote: And already utterly unreadable for me... IMHO goes to show that this is a very personal matter :-) Units that include hierarchy via class types are a supplement for namespaces in languages such as c#. Since Namespaces are not *yet* available i

Re: [fpc-pascal] Looking for JavaScript component on FPC

2015-04-02 Thread Andrew Brunner
On 4/2/2015 11:46 AM, Michael Van Canneyt wrote: Namespaces are available as dotted units ? Namespace as dotted units? I use 3.1.1 compiled here so there is no problem. FPC since as far as I recall (svn) has had support for naming units with multiple dots. I've had tons of units with includ

[fpc-pascal] Help building FPC on armhf

2015-06-27 Thread Andrew Brunner
Makefile:215: *** The Makefile doesn't support target armhf-linux, please run fpcmake first. Stop. Can someone help? -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and

Re: [fpc-pascal] Help building FPC on armhf

2015-06-28 Thread Andrew Brunner
27;/Developer/FPC/compiler' Makefile:2826: recipe for target 'compiler_cycle' failed make[1]: *** [compiler_cycle] Error 2 make[1]: Leaving directory '/Developer/FPC' Makefile:2858: recipe for target 'build-stamp.arm-linux' failed

Re: [fpc-pascal] Help building FPC on armhf

2015-06-29 Thread Andrew Brunner
as your error seems to be caused by some conditional parsing the extra defines above might help (or not .) Michael Hi Michael, I tried to use the options above to no avail. Thanks for the effort though. -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great

Re: [fpc-pascal] Help building FPC on armhf

2015-06-30 Thread Andrew Brunner
problem is only with building on Linux-arm. I've never had this issue in any other linux device. -- Andrew Brunner Aurawin LLC 512.850.3117 https://aurawin.com/ Aurawin is a great new way to store, share and enjoy your photos, videos, music, and more. ___

<    1   2