tw12942.pp 436 B

1234567891011121314151617181920212223242526272829303132
  1. { %skiptarget=go32v2 }
  2. {$mode objfpc}
  3. {$s+}
  4. uses
  5. {$ifdef unix}
  6. cthreads,
  7. {$endif}
  8. classes;
  9. type
  10. tmythread = class(tthread)
  11. procedure execute; override;
  12. end;
  13. procedure tmythread.execute;
  14. var
  15. a: array[0..1024*1024-1] of byte;
  16. begin
  17. fillchar(a,sizeof(a),123);
  18. end;
  19. var
  20. t: tmythread;
  21. begin
  22. t:=tmythread.create(false,1024*1024+128*1024);
  23. t.waitfor;
  24. if assigned(t.fatalexception) then
  25. halt(1);
  26. t.free;
  27. end.