View Issue Details

IDProjectCategoryView StatusLast Update
0037204FPCRTLpublic2020-06-13 10:49
ReporterChristo Crause Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0037204: Embedded - heap manager doesn't free small blocks
DescriptionRelated to 0037195, heap manager doesn't free small blocks for embedded target (0037195 fix was applied to freertos heapmgr unit only).
TagsNo tags attached.
Fixed in Revision45641
FPCOldBugId
FPCTarget-
Attached Files

Activities

Christo Crause

2020-06-11 18:22

reporter  

embedded-heapmgr.patch (412 bytes)   
diff --git a/rtl/embedded/heapmgr.pp b/rtl/embedded/heapmgr.pp
index 50b597ecf6..060a9d92c1 100644
--- a/rtl/embedded/heapmgr.pp
+++ b/rtl/embedded/heapmgr.pp
@@ -195,6 +195,8 @@ Unit heapmgr;
             exit;
           end;
         sz := Align(FindSize(addr)+SizeOf(pointer), sizeof(pointer));
+        if sz < MinBlock then
+          sz := MinBlock;
 
         InternalFreeMem(@pptruint(addr)[-1], sz);
 
embedded-heapmgr.patch (412 bytes)   

Florian

2020-06-12 22:51

administrator   ~0123407

Thanks, applied.

Christo Crause

2020-06-13 10:49

reporter   ~0123414

Thank you.

Issue History

Date Modified Username Field Change
2020-06-11 18:22 Christo Crause New Issue
2020-06-11 18:22 Christo Crause File Added: embedded-heapmgr.patch
2020-06-12 22:51 Florian Assigned To => Florian
2020-06-12 22:51 Florian Status new => resolved
2020-06-12 22:51 Florian Resolution open => fixed
2020-06-12 22:51 Florian Fixed in Version => 3.3.1
2020-06-12 22:51 Florian Fixed in Revision => 45641
2020-06-12 22:51 Florian FPCTarget => -
2020-06-12 22:51 Florian Note Added: 0123407
2020-06-13 10:49 Christo Crause Status resolved => closed
2020-06-13 10:49 Christo Crause Note Added: 0123414