It is currently Tue Jun 02, 2020 6:41 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: EnablePurifier + ReAllocateMemory
PostPosted: Sat Dec 21, 2019 2:10 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Nov 03, 2008 9:56 pm
Posts: 538
Run this code with purifier enabled (Compiler -> Compiler Options -> Compile/Run -> Enable Purifier):
Code:
EnableExplicit
EnableDebugger

Procedure test(*void)
  Protected *mem
 
  Repeat
    *mem=ReAllocateMemory(*mem,Random(1024,32))
  ForEver
 
EndProcedure

CreateThread(@test(),0) ;comment out this line and then it is all ok
test(0)

If purifier is enabled and 2 or more threads are calling ReAllocateMemory() then you get "Overflow in an dynamically allocated memory block" error.
Tested with PB 5.71 LTS x86 & x64 on Windows 10 x64 1909


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye