mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 21:48:09 +02:00
* CheckInitialStkLen and/or StackLength initialization added to previously omitted targets
git-svn-id: trunk@1736 -
This commit is contained in:
parent
349d7108ce
commit
f29fde8978
@ -747,8 +747,13 @@ end;
|
||||
SystemUnit Initialization
|
||||
*****************************************************************************}
|
||||
|
||||
function CheckInitialStkLen (StkLen: SizeUInt): SizeUInt;
|
||||
begin
|
||||
CheckInitialStkLen := StkLen;
|
||||
end;
|
||||
|
||||
begin
|
||||
StackLength := CheckInitialStkLen (InitialStkLen);
|
||||
{ Initialize ExitProc }
|
||||
ExitProc:=Nil;
|
||||
{ Setup heap }
|
||||
|
@ -531,6 +531,7 @@ begin
|
||||
myheaprealsize:=$2000;
|
||||
myheapstart:=nil;
|
||||
heap_handle:=sys_create_area('fpcheap',myheapstart,0,myheaprealsize,0,3);//!!
|
||||
StackLength := CheckInitialStkLen (InitialStkLen);
|
||||
if heap_handle>0 then begin
|
||||
InitHeap;
|
||||
end else system_exit;
|
||||
|
@ -445,6 +445,11 @@ begin
|
||||
else GetFileHandleCount := L2;
|
||||
end;
|
||||
|
||||
function CheckInitialStkLen (StkLen: SizeUInt): SizeUInt;
|
||||
begin
|
||||
CheckInitialStkLen := StkLen;
|
||||
end;
|
||||
|
||||
var TIB: PThreadInfoBlock;
|
||||
PIB: PProcessInfoBlock;
|
||||
|
||||
@ -558,6 +563,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
exitproc:=nil;
|
||||
StackLength := CheckInitialStkLen (InitialStkLen);
|
||||
|
||||
{Initialize the heap.}
|
||||
initheap;
|
||||
|
@ -694,6 +694,11 @@ begin
|
||||
else GetFileHandleCount := L2;
|
||||
end;
|
||||
|
||||
function CheckInitialStkLen (StkLen: SizeUInt): SizeUInt;
|
||||
begin
|
||||
CheckInitialStkLen := StkLen;
|
||||
end;
|
||||
|
||||
var TIB: PThreadInfoBlock;
|
||||
RC: cardinal;
|
||||
ErrStr: string;
|
||||
@ -707,6 +712,7 @@ begin
|
||||
DosGetInfoBlocks (@TIB, @PIB);
|
||||
StackBottom := TIB^.Stack;
|
||||
StackTop := PtrUInt (TIB^.StackLimit);
|
||||
StackLength := CheckInitialStkLen (InitialStkLen);
|
||||
|
||||
{Set type of application}
|
||||
ApplicationType := PIB^.ProcType;
|
||||
|
@ -110,5 +110,6 @@ begin
|
||||
end;
|
||||
|
||||
begin
|
||||
StackLength := CheckInitialStkLen (InitialStkLen);
|
||||
ExitCode:=0;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user