I just tested, SetLength a string does not zero its elements (the chars).
However, SetLength a dynamic array seems to zero its elements.
I cannot find the official behaviour by googling.
Anyone has the official saying?
Dennis
___
fpc-pascal maillist
On 2015-12-10 21:26, Seth Grover wrote:
> Why does using the default memory manager seem to leak memory like crazy if
> I'm doing heavy threading? I'm setting FreeOnTerminate to true in
> conjunction
I can confirm similar behaviour under 64-bit FreeBSD 10.1. Compiled
without cmem is ends up using
Dennis wrote on Fri, 11 Dec 2015:
I just tested, SetLength a string does not zero its elements (the chars).
However, SetLength a dynamic array seems to zero its elements.
Dynamic arrays are indeed zeroed when changing the length, while
strings are not. For dynamic arrays, it is necessary
Seth Grover wrote on Thu, 10 Dec 2015:
I am experiencing a weird issue regarding threading and shared libraries
under Linux. I've boiled it down to a very simple test case in hopes you
can help me understand what I'm doing wrong.
You're not doing anything wrong. It's caused by
http://bugs.f
Jonas Maebe wrote:
Dennis wrote on Fri, 11 Dec 2015:
I just tested, SetLength a string does not zero its elements (the
chars).
However, SetLength a dynamic array seems to zero its elements.
Dynamic arrays are indeed zeroed when changing the length, while strings
are not. For dynamic array
Jonas Maebe wrote:
Dennis wrote on Fri, 11 Dec 2015:
I just tested, SetLength a string does not zero its elements (the
chars).
However, SetLength a dynamic array seems to zero its elements.
Dynamic arrays are indeed zeroed when changing the length, while
strings are not. For dynamic ar
Jonas wrote:
>
> >> I am experiencing a weird issue regarding threading and shared libraries
> >> under Linux. I've boiled it down to a very simple test case in hopes you
> >> can help me understand what I'm doing wrong.
>
> >You're not doing anything wrong. It's caused by
> >http://bugs.freepasca
I am having a problem with fpc picking up linking directories on my
Raspberry Pi.
I have a this lib:
/opt/vc/lib/libGLESv2.so
When I execute "ldconfig -v" it shows both "/opt/vc/lib/" as a ld link
directory, and the file libGLESv2.so as a linkable library.
But when I use this code in a unit:
p
Anthony Walter wrote on Fri, 11 Dec 2015:
I am having a problem with fpc picking up linking directories on my
Raspberry Pi.
It's unrelated to FPC. The same will happen with GCC or Clang.
I have a this lib:
/opt/vc/lib/libGLESv2.so
When I execute "ldconfig -v" it shows both "/opt/vc/lib/"
Hi,
http://www.freepascal.org/docs-html/rtl/cwstring/
http://www.freepascal.org/docs-html/rtl/cthreads/
Both the "cwstring and "cthreads" units (as per the documentation) says
that it links to the C library of unix systems.
Does this make your programs more dependent on a specific version of the
Graeme Geldenhuys wrote on Fri, 11 Dec 2015:
Both the "cwstring and "cthreads" units (as per the documentation) says
that it links to the C library of unix systems.
Does this make your programs more dependent on a specific version of the
C library? Or can you run a current unix program (say co
Many thanks Jonas for all that information. It is very useful to know.
Maybe the documentation for cwstrings should include a link to
fpwidestring unit and vice-verse. I didn't know about the fpwidestring unit.
As for the thread manager being very OS-specific. Well FPC being a
compiler that as ve
Thanks for the explanation.
I guess I'll create symlinks in the standard locations (/usr/lib) for these
libraries and put that in an install script. Either that or add to fpc.cfg,
I'm not sure which is better.
Explanation: I'm creating a series of Pi examples for GLES2 and SDL2 along
the lines on
On 12/11/2015 09:50 AM, Anthony Walter wrote:
I am having a problem with fpc picking up linking directories on my
Raspberry Pi.
I have a this lib:
/opt/vc/lib/libGLESv2.so
I get this linker error during compile:
/usr/lib/ld: cannot lind -lGLESv2
But when I compile adding -Fl/opt/vc/lib t
On 11/12/15 17:44, Anthony Walter wrote:
I guess I'll create symlinks in the standard locations (/usr/lib) for
these libraries and put that in an install script. Either that or add to
fpc.cfg, I'm not sure which is better.
Definitely the latter. Everything under /usr belongs exclusively to the
On 11/12/15 17:31, Graeme Geldenhuys wrote:
As for the thread manager being very OS-specific. Well FPC being a
compiler that as very CPU and OS specific functionality well
abstracted... such a thread manager should be just another abstraction
layer. ;-) I'm not suggesting the FPC team implement i
Jonas, well the thing is on Raspbian the GLESv2 implementation, which works
with the Pi GPU, is at /opt/vc/lib by default. It's owned by root and there
is no install. The install I was referring to is building and installing of
SDL2 from sources. I already have to tell SDL2 build to find the correc
On 11.12.2015 17:31, Graeme Geldenhuys wrote:
Many thanks Jonas for all that information. It is very useful to know.
Maybe the documentation for cwstrings should include a link to
fpwidestring unit and vice-verse. I didn't know about the fpwidestring unit.
As for the thread manager being very O
On 11/12/15 18:44, Anthony Walter wrote:
Jonas, well the thing is on Raspbian the GLESv2 implementation, which
works with the Pi GPU, is at /opt/vc/lib by default. It's owned by root
and there is no install. The install I was referring to is building and
installing of SDL2 from sources. I already
Hello all,
I want to use a DLL writen in Pascal to provide functions for a Excel VBA code:
The example code of my DLL is:
library CE;
{$mode objfpc}
uses
Sysutils;
function level(x1, x2: integer): integer; cdecl; export;
begin
result := x1 + 2*x2;
end;
exports
level name 'level';
end.
In VBA
Jonas Maebe wrote:
Graeme Geldenhuys wrote on Fri, 11 Dec 2015:
Both the "cwstring and "cthreads" units (as per the documentation) says
that it links to the C library of unix systems.
Does this make your programs more dependent on a specific version of the
C library? Or can you run a current u
21 matches
Mail list logo