All of lore.kernel.org
 help / color / mirror / Atom feed
* Does the function malloc() uses the real malloc or the wrap one in heapobj_pkg_init_private().
@ 2020-04-07  9:13 孙世龙
  2020-04-07  9:55 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: 孙世龙 @ 2020-04-07  9:13 UTC (permalink / raw)
  To: xenomai

The source code url is
https://gitlab.denx.de/Xenomai/xenomai/-/blob/v3.1/lib/copperplate/
heapobj-heapmem.c  line:107

In the source code listed above, function heapobj_pkg_init_private()  calls
malloc().
I hope to know whether it calls the wrapper function or
the real malloc function which provides by the glibc?

How could I distinguish a function directs to the wrapper function or
the real one which provides by the glibc?

Thanks a lot. Looking forward to your replay.

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

* Re: Does the function malloc() uses the real malloc or the wrap one in heapobj_pkg_init_private().
  2020-04-07  9:13 Does the function malloc() uses the real malloc or the wrap one in heapobj_pkg_init_private() 孙世龙
@ 2020-04-07  9:55 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2020-04-07  9:55 UTC (permalink / raw)
  To: 孙世龙, xenomai

On 07.04.20 11:13, 孙世龙 via Xenomai wrote:
> The source code url is
> https://gitlab.denx.de/Xenomai/xenomai/-/blob/v3.1/lib/copperplate/
> heapobj-heapmem.c  line:107
> 
> In the source code listed above, function heapobj_pkg_init_private()  calls
> malloc().
> I hope to know whether it calls the wrapper function or
> the real malloc function which provides by the glibc?
> 
> How could I distinguish a function directs to the wrapper function or
> the real one which provides by the glibc?
> 

(Transparent) wrapping only happens when an object is linked with the 
related options (-Wl,XXX.wrappers). Internal libs are not built like 
that (you can always check the build log), so the original malloc is called.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2020-04-07  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07  9:13 Does the function malloc() uses the real malloc or the wrap one in heapobj_pkg_init_private() 孙世龙
2020-04-07  9:55 ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.