mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 15:47:51 +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;
|
||||
|
||||
{ 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
|
||||
{ tai_datablock cannot yet be handled via the high level typed const
|
||||
builder, because it implies the generation of a symbol, while this
|
||||
|
@ -3952,7 +3952,7 @@ begin
|
||||
end;
|
||||
|
||||
{ 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
|
||||
case target_info.system of
|
||||
{$ifdef AVR}
|
||||
|
@ -78,6 +78,10 @@ const
|
||||
sLineBreak = LineEnding;
|
||||
DefaultTextLineBreakStyle : TTextLineBreakStyle = tlbsCRLF;
|
||||
|
||||
var
|
||||
__heapsize: Word;external name '__heapsize';
|
||||
__fpc_initialheap: array[0..0] of byte;external name '__fpc_initialheap';
|
||||
|
||||
{$I system.inc}
|
||||
{$I tinyheap.inc}
|
||||
|
||||
@ -256,12 +260,9 @@ end;
|
||||
SystemUnit Initialization
|
||||
*****************************************************************************}
|
||||
|
||||
var
|
||||
ZXHeap: array [0..{1023}255] of Byte;
|
||||
|
||||
procedure InitZXHeap;
|
||||
begin
|
||||
RegisterTinyHeapBlock_Simple_Prealigned(@ZXHeap[0],SizeOf(ZXHeap));
|
||||
RegisterTinyHeapBlock_Simple_Prealigned(@__fpc_initialheap,__heapsize);
|
||||
end;
|
||||
|
||||
procedure SysInitStdIO;
|
||||
|
Loading…
Reference in New Issue
Block a user