diff --git a/rtl/inc/heaptrc.pp b/rtl/inc/heaptrc.pp
index b84aec1..3f4db83 100644
--- a/rtl/inc/heaptrc.pp
+++ b/rtl/inc/heaptrc.pp
@@ -631,6 +631,7 @@ begin
     leavecriticalsection(todo_lock);
   if release_mem then
   begin
+    fillchar(p^, ppsize, $AA);
     { release the normal memory at least }
     i:=SysFreeMemSize(pp,ppsize);
     { return the correct size }
