fpc/tests/webtbs/tw12942.pp
Jonas Maebe 1a1fc1357d * honour the specified stack size when creating new threads on unix
platforms + test (mantis #12942)

git-svn-id: trunk@12527 -
2009-01-08 18:37:24 +00:00

33 lines
436 B
ObjectPascal

{ %skiptarget=go32v2 }
{$mode objfpc}
{$s+}
uses
{$ifdef unix}
cthreads,
{$endif}
classes;
type
tmythread = class(tthread)
procedure execute; override;
end;
procedure tmythread.execute;
var
a: array[0..1024*1024-1] of byte;
begin
fillchar(a,sizeof(a),123);
end;
var
t: tmythread;
begin
t:=tmythread.create(false,1024*1024+128*1024);
t.waitfor;
if assigned(t.fatalexception) then
halt(1);
t.free;
end.