mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 08:06:07 +02:00
* fixed add_tail functionality for cpus which require natural
alignment git-svn-id: trunk@7471 -
This commit is contained in:
parent
4f95f742f4
commit
79e84ba129
@ -447,7 +447,11 @@ begin
|
|||||||
if add_tail then
|
if add_tail then
|
||||||
begin
|
begin
|
||||||
pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptrint);
|
pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptrint);
|
||||||
|
{$ifdef FPC_SUPPORTS_UNALIGNED}
|
||||||
|
unaligned(pl^):=$DEADBEEF;
|
||||||
|
{$else FPC_SUPPORTS_UNALIGNED}
|
||||||
pl^:=$DEADBEEF;
|
pl^:=$DEADBEEF;
|
||||||
|
{$endif FPC_SUPPORTS_UNALIGNED}
|
||||||
end;
|
end;
|
||||||
{ clear the memory }
|
{ clear the memory }
|
||||||
fillchar(p^,size,#255);
|
fillchar(p^,size,#255);
|
||||||
@ -783,7 +787,11 @@ begin
|
|||||||
if add_tail then
|
if add_tail then
|
||||||
begin
|
begin
|
||||||
pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptrint);
|
pl:=pointer(pp)+allocsize-pp^.extra_info_size-sizeof(ptrint);
|
||||||
|
{$ifdef FPC_SUPPORTS_UNALIGNED}
|
||||||
|
unaligned(pl^):=$DEADBEEF;
|
||||||
|
{$else FPC_SUPPORTS_UNALIGNED}
|
||||||
pl^:=$DEADBEEF;
|
pl^:=$DEADBEEF;
|
||||||
|
{$endif FPC_SUPPORTS_UNALIGNED}
|
||||||
end;
|
end;
|
||||||
{ adjust like a freemem and then a getmem, so you get correct
|
{ adjust like a freemem and then a getmem, so you get correct
|
||||||
results in the summary display }
|
results in the summary display }
|
||||||
|
Loading…
Reference in New Issue
Block a user