public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* How to hook malloc call?
@ 2023-01-14 16:32 SuHsueyu
  2023-01-15 13:00 ` Florian Weimer
  0 siblings, 1 reply; 2+ messages in thread
From: SuHsueyu @ 2023-01-14 16:32 UTC (permalink / raw)
  To: libc-help

Try use __malloc_hook, __free_hook, but these seem to be deprecated in
glibc 2.35. Is there a new way to hook the malloc call?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to hook malloc call?
  2023-01-14 16:32 How to hook malloc call? SuHsueyu
@ 2023-01-15 13:00 ` Florian Weimer
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Weimer @ 2023-01-15 13:00 UTC (permalink / raw)
  To: SuHsueyu via Libc-help; +Cc: SuHsueyu

* SuHsueyu via Libc-help:

> Try use __malloc_hook, __free_hook, but these seem to be deprecated in
> glibc 2.35. Is there a new way to hook the malloc call?

Please see:

  Replacing malloc
  <https://www.gnu.org/software/libc/manual/html_node/Replacing-malloc.html>

You can supply your own malloc implementation.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-15 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-14 16:32 How to hook malloc call? SuHsueyu
2023-01-15 13:00 ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).