Skip to contentSkip to conversation

where is malloc()?

U-Boot quantumlight 2 participants 3 messages Feb 19, 2016

lore
Share & tools
lore
#0 lore raw

I can find malloc.h describing that it uses a specific malloc. But I can't seem to find where the u-boot source keeps the malloc implementation.

I see that in include/_exports.h it is defined:

EXPORT_FUNC(malloc)

Also there seems to be a dlmalloc.c that should define a void* malloc(size) function but I can't seem to find it in here. Is there some macro magic here?

--
View this message in context: http://u-boot.10912.n7.nabble.com/where-is-malloc-tp246389.html
Sent from the U-Boot mailing list archive at Nabble.com.

#1 lore raw

depending on your config it's either in common/malloc_simple.c (#define malloc malloc_simple) or in common/dlmalloc.c (Void_t* mALLOc(size_t bytes) and # define mALLOc malloc).

Michael

Quoted 23 lines · quantumlight

I can find malloc.h describing that it uses a specific malloc. But I can't seem to find where the u-boot source keeps the malloc implementation.

I see that in include/_exports.h it is defined:

EXPORT_FUNC(malloc)

Also there seems to be a dlmalloc.c that should define a void* malloc(size) function but I can't seem to find it in here. Is there some macro magic here?

--
View this message in context:
http://u-boot.10912.n7.nabble.com/where-is-malloc-tp246389.html
Sent from the U-Boot mailing list archive at Nabble.com.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot