Perhaps a tangent - but I noticed recently just how small you can go
with stack size if you use a class for your variable store versus the
typical:
procedure something;
var
variablehere: ansistring;
begin
end;
by doing something like:
type Tmyclass=class
somefield: ansistring;
someint: longint;
someword: word;
constructor create;
destructor destroy;
end;
...assume you get the drift... about writing the obvious stuff -
constructor and destructor etc how you want...
but then:
procedure something;
var
MyClass: Tmyclass;
begin
MyClass:=TMyClass.create;
...whatever here...
MyClass.Destroy;MyClass:=nil;
end;
I know this might be a little of a tangent - but I too had the need to
make one routine in particular use a tiny stack and this was how I
managed to get it done.
--Jason P Sage
On 9/1/2010 4:15 AM, Jarto Tarpio wrote:
> 1) Are you not creating the child threads as suspended? If you do
> that, you should have all the time in the world to call create and
> any init procedures before finally calling thread.resume
>
> 2) Thanks for the settings. I'll give that a try if nothing else
> helps.
>
> 3) Could you give me more info about what signals you are trapping
> (and how?) and what nmap parameters you are using? I think I have
> issues with this too.
>
> 4) When you create the child thread with FPC, you can set the stack
> size. If you don't do that, the stack size is determined
> automatically. That results in unnecessarily huge stacks for every
> thread and you run out of memory with lots of connections. On Kylix
> you can't set the stack size in code. Using ulimit -s works there.
>
> Regards,
>
> Jarto
>
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public