Re: Memory leaks in Magick++ ???

Bob Friesenhahn <[email protected]> Tue, 3 Mar 2020 13:36:01 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--3735943886-984599720-1583264161=:2854
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Thu, 27 Feb 2020, 10bxjfhf wrote:
>
> D:\pkg\C++\MSVC2019\GM\gm-c031-d3ed\magick\memory.c(241) : {447928} normal 
> block at 0x07DDE698, 135 bytes long.
>
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
>
> D:\pkg\C++\MSVC2019\GM\gm-c031-d3ed\magick\memory.c(241) : {213797} normal 
> block at 0x07DDEAE8, 135 bytes long.
>
>  Data: <                > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD

These memory allocations are made via Windows-specific 
_aligned_malloc() which allocates alligned memory.  Such allocations 
are then deallocated using _aligned_free() (at line 574 of 
magick/memory.c).  Does your memory-leak checking framework handle 
memory allocations using _aligned_malloc()/_aligned_free()?

I always found it interesting that the original Unix memalign() 
function did not indicate that the returned pointer could be 
deallocated using free().  This means that it was only safe to leak 
memory allocated using memalign().  Luckily posix_memalign() does not 
have this problem.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
--3735943886-984599720-1583264161=:2854
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--3735943886-984599720-1583264161=:2854
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis

--3735943886-984599720-1583264161=:2854--