Re: [fpc-devel] TCustomApplication.Log(?)

2010-02-16 Thread Martin Schreiber
On Monday 15 February 2010 21:45:33 Joost van der Sluis wrote: I think option two is the best one. Then I can use the TEventLog for daemon and web applications. But I'm really interested in the opinion of the Lazarus and MseIDE people. What is the advantage to integrate log facility into

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Michael Schnell
On 02/13/2010 09:38 PM, Jonas Maebe wrote: It would make the memory manager slower, and I don't think that aggregating few statistics is a good reason to do so Yep. But it should be possible to implement a function that on request (slowly) collects the list of (or at last sum of) the state

Re: [fpc-devel] TCustomApplication.Log(?)

2010-02-16 Thread Michael Schnell
On 02/16/2010 10:35 AM, Martin Schreiber wrote: Correct, Michael Schnell is currently porting MSEgui tnoguiapplication to Lazarus. The Lazarus port implements tnoguiapplication as class of tmseapplication and tmseapplication in this implementation is a class of TCustomApplication from the

Re: [fpc-devel] TCustomApplication.Log(?)

2010-02-16 Thread Michael Schnell
P.S:: The mseaplication class (as well the mseide application version as my port) implements postevent() and thus might be seen as a provider for an event log. But TCustomApplication does not seem to be able to log events, as it does not seem see them. -Michael

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Nikolai Zhubr
16.02.2010 14:39, Michael Schnell: On 02/13/2010 09:38 PM, Jonas Maebe wrote: It would make the memory manager slower, and I don't think that aggregating few statistics is a good reason to do so Yep. But it should be possible to implement a function that on request (slowly) collects the list

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Jonas Maebe
On 16 Feb 2010, at 16:49, Nikolai Zhubr wrote: 16.02.2010 14:39, Michael Schnell: On 02/13/2010 09:38 PM, Jonas Maebe wrote: It would make the memory manager slower, and I don't think that aggregating few statistics is a good reason to do so Yep. But it should be possible to implement a

Re: [fpc-devel] TCustomApplication.Log(?)

2010-02-16 Thread Joost van der Sluis
On Tue, 2010-02-16 at 10:35 +0100, Martin Schreiber wrote: On Monday 15 February 2010 21:45:33 Joost van der Sluis wrote: I think option two is the best one. Then I can use the TEventLog for daemon and web applications. But I'm really interested in the opinion of the Lazarus and MseIDE

Re: [fpc-devel] TCustomApplication.Log(?)

2010-02-16 Thread Michael Van Canneyt
On Tue, 16 Feb 2010, Joost van der Sluis wrote: On Tue, 2010-02-16 at 10:35 +0100, Martin Schreiber wrote: On Monday 15 February 2010 21:45:33 Joost van der Sluis wrote: I think option two is the best one. Then I can use the TEventLog for daemon and web applications. But I'm really

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Nikolai Zhubr
16.02.2010 18:59, Jonas Maebe: [...] That would require separately maintaining a list of the memory managers of all threads, which afaik does not exist currently. Exactly! That's what I'd be happy with. I'll call it once per second so a bit of slowdown wouldn't matter much. I think creating a

Re: [fpc-devel] GetHeapStatus.TotalAllocated

2010-02-16 Thread Nikolai Zhubr
16.02.2010 20:17, Nikolai Zhubr: Ok. Would it be sufficient to only hook Getmem and Freemem? From a brief look it seems other members (such as ReAllocMem) do not modify the heap directly, so they need not be hooked I guess. After some more reading and testing I think generally GetMem,

[fpc-devel] MemSize argument validity

2010-02-16 Thread Nikolai Zhubr
Hello people, I've just discovered that passing an invalid pointer to MemSize() results in a bogus value returned and no error generally reported. Is this intentional? Example: var a: integer; begin writeln('MemSize(@a)=', MemSize(@a)); end.

[fpc-devel] FreeMem and MemSize

2010-02-16 Thread Nikolai Zhubr
Hello again, Is it on purpose that FreeMem() and MemSize() return different values for the same pointer? (AFAICS currently MemSize returns netto whereas FreeMem returns brutto) Thank you! Nikolai ___ fpc-devel maillist -

[fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

2010-02-16 Thread Luiz Americo Pereira Camara
While trying to get the RGB values (bytes) of a TFPColor i got confused about the format of TFPColor Some hardcoded colors (unit FPImage) like colGray, colTea sets the high byte value of Red, Green, Blue fields with the corresponding byte value of RGB and leaves the low byte with 0. Other

Re: [fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

2010-02-16 Thread Mattias Gaertner
On Tue, 16 Feb 2010 17:15:37 -0300 Luiz Americo Pereira Camara luiz...@oi.com.br wrote: While trying to get the RGB values (bytes) of a TFPColor i got confused about the format of TFPColor Some hardcoded colors (unit FPImage) like colGray, colTea sets the high byte value of Red, Green,

Re: [fpc-devel] RTL and Unicode filenames operations.

2010-02-16 Thread Vincent Snijders
dmitry boyarintsev schreef: Reported: http://bugs.freepascal.org/view.php?id=15795 It's up to FPC team to accept or reject the package. Thanks, I will monitor the issue to see the outcome. Vincent ___ fpc-devel maillist -

Re: [fpc-devel] Correlation between TFPColor and RGB values (possible inconsistencies)

2010-02-16 Thread Luiz Americo Pereira Camara
Mattias Gaertner escreveu: On Tue, 16 Feb 2010 17:15:37 -0300 Luiz Americo Pereira Camara luiz...@oi.com.br wrote: or colGray be redefined as colGray : TFPColor = (Red: $8080; Green: $8080; Blue: $8080; Alpha: alphaOpaque) ?? Yes, although this rarely makes a difference.