Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using heap checker with external memory pool #803

Closed
unaiur opened this issue May 26, 2016 · 4 comments
Closed

Using heap checker with external memory pool #803

unaiur opened this issue May 26, 2016 · 4 comments

Comments

@unaiur
Copy link

unaiur commented May 26, 2016

I'm trying to use the gperftools heap checker with DPDK packet buffers.

DPDK is an library that allocates packet buffers in an specially mapped memory that a network card can access directly using DMA. Therefore, I can't use tcmalloc to allocate them.

I'm trying to invoke MallocHook::InvokeNewHook & MallocHook::InvokeDeleteHook when allocating and releasing packet buffers but they are undefined inline functions. Also, the slow variants are private members of MallocHook class.

How this API is supposed to work? Can you make public the Slow variants?

@alk
Copy link
Contributor

alk commented Jun 26, 2016

By design of this api, you're not supposed to call malloc hooks yourself. What are you trying to achieve?

@alk
Copy link
Contributor

alk commented Jun 26, 2016

Actually looking at ticket subject, it looks like you want heap checker to "check" your dma-ful memory allocator. But it is not capable of that.

What exactly you want it to check?

I think you probably want to look at asan api instead. I.e. so that you can integrate your custom malloc with it.

@unaiur
Copy link
Author

unaiur commented Jun 26, 2016

Yes. I want to track memory allocations from a custom allocator.

El El dom, 26 jun 2016 a las 3:58, Aliaksey Kandratsenka (aka Aliaksei
Kandratsenka) notifications@github.com escribió:

Actually looking at ticket subject, it looks like you want heap checker to
"check" your dma-ful memory allocator. But it is not capable of that.

What exactly you want it to check?

I think you probably want to look at asan api instead. I.e. so that you
can integrate your custom malloc with it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#803 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AFnLByGuADteFg4eod3SR9ybZLxRI75Pks5qPdzhgaJpZM4InXiN
.

@alk
Copy link
Contributor

alk commented Jun 26, 2016

Hm. What kind of tracking is that? Can you please elaborate ? Have you looked at asan ?

@alk alk closed this as completed Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants