mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 13:49:39 +02:00
+ allow setting the heap size for the ZX Spectrum target
git-svn-id: branches/z80@45102 -
This commit is contained in:
parent
3e38e3acc5
commit
caecdfd51d
@ -1547,7 +1547,7 @@ implementation
|
|||||||
tcb.free;
|
tcb.free;
|
||||||
|
|
||||||
{ allocate an initial heap on embedded systems }
|
{ allocate an initial heap on embedded systems }
|
||||||
if target_info.system in (systems_embedded+systems_freertos) then
|
if target_info.system in (systems_embedded+systems_freertos+[system_z80_zxspectrum]) then
|
||||||
begin
|
begin
|
||||||
{ tai_datablock cannot yet be handled via the high level typed const
|
{ tai_datablock cannot yet be handled via the high level typed const
|
||||||
builder, because it implies the generation of a symbol, while this
|
builder, because it implies the generation of a symbol, while this
|
||||||
|
@ -3952,7 +3952,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Set up default value for the heap }
|
{ Set up default value for the heap }
|
||||||
if target_info.system in (systems_embedded+systems_freertos) then
|
if target_info.system in (systems_embedded+systems_freertos+[system_z80_zxspectrum]) then
|
||||||
begin
|
begin
|
||||||
case target_info.system of
|
case target_info.system of
|
||||||
{$ifdef AVR}
|
{$ifdef AVR}
|
||||||
|
@ -78,6 +78,10 @@ const
|
|||||||
sLineBreak = LineEnding;
|
sLineBreak = LineEnding;
|
||||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||||
|
|
||||||
|
var
|
||||||
|
__heapsize: Word;external name '__heapsize';
|
||||||
|
__fpc_initialheap: array[0..0] of byte;external name '__fpc_initialheap';
|
||||||
|
|
||||||
{$I system.inc}
|
{$I system.inc}
|
||||||
{$I tinyheap.inc}
|
{$I tinyheap.inc}
|
||||||
|
|
||||||
@ -256,12 +260,9 @@ end;
|
|||||||
SystemUnit Initialization
|
SystemUnit Initialization
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
var
|
|
||||||
ZXHeap: array [0..{1023}255] of Byte;
|
|
||||||
|
|
||||||
procedure InitZXHeap;
|
procedure InitZXHeap;
|
||||||
begin
|
begin
|
||||||
RegisterTinyHeapBlock_Simple_Prealigned(@ZXHeap[0],SizeOf(ZXHeap));
|
RegisterTinyHeapBlock_Simple_Prealigned(@__fpc_initialheap,__heapsize);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure SysInitStdIO;
|
procedure SysInitStdIO;
|
||||||
|
Loading…
Reference in New Issue
Block a user