Valgrind and mmap

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Valgrind and mmap

Mehran Frohar
Valgrind and mmap

Apparently Valgrind cannot properly keep track of blocks allocated by mmap. Does anyone know if there is a workaround for this?

Thanks,
Mehran

Reply | Threaded
Open this post in threaded view
|

Re: Valgrind and mmap

Tom Hughes-2
In message <[hidden email]>
        Mehran Frohar <[hidden email]> wrote:

> Apparently Valgrind cannot properly keep track of blocks allocated by mmap.
> Does anyone know if there is a workaround for this?

It should keep track of them just fine. What makes you think that
it doesn't manage to do so?

Tom

--
Tom Hughes ([hidden email])
http://www.compton.nu/


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Valgrind and mmap

Julian Seward-2
In reply to this post by Mehran Frohar
On Thursday 02 June 2005 14:03, Mehran Frohar wrote:
> Apparently Valgrind cannot properly keep track of blocks allocated by mmap.
> Does anyone know if there is a workaround for this?

Uh, this isn't a good bug report.  Can you get us some specifics,
like what bit of code you're running and how the behaviour
differs from what you expected?

J


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Valgrind and mmap

Eric Hanchrow
In reply to this post by Mehran Frohar
I forget the details, but I think I needed to add some special
Valgrind macros to my code, near where it called mmap.  Let me know if
you'd like more information.
--
In the practice of computing, where we have so much latitude for
making a mess of it, mathematical elegance is not a dispensable
luxury, but a matter of life and death.
        -- Edsger W. Dijkstra: My Hopes of Computing Science (EWD  709)
        http://www.cs.utexas.edu/users/EWD/ewd07xx/EWD709.PDF



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Re: Valgrind and mmap

Tom Hughes-2
In message <[hidden email]>
          Eric Hanchrow <[hidden email]> wrote:

> I forget the details, but I think I needed to add some special
> Valgrind macros to my code, near where it called mmap.  Let me know if
> you'd like more information.

We'd like more information.

Tom

--
Tom Hughes ([hidden email])
http://www.compton.nu/


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
Reply | Threaded
Open this post in threaded view
|

Re: Valgrind and mmap

Eric Hanchrow
OK, what you want to do is: read the valgrind documentation and look
at the macros VALGRIND_CREATE_MEMPOOL, VALGRIND_MEMPOOL_ALLOC, and
VALGRIND_MEMPOOL_FREE.  In my case, at least, those were all I needed
to tell valgrind "Hey, I'm managing my own memory here; please treat
the region that I just mapped as if it were part of the heap".
--

        ___
   oo  // \      "De Chelonian Mobile"
  (_,/ _/      TortoiseSVN
     _/__/>    The coolest Interface to (Sub)Version Control
    /_/   _     http://tortoisesvn.tigris.org




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Valgrind-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/valgrind-users