rte_malloc_heap usage scenario

2 messages, 2 authors, 2017-03-14 · open the first message on its own page

rte_malloc_heap usage scenario

From: Yerden Zhumabekov <hidden>
Date: 2017-03-09 04:48:34

Hello,

Can anybody explain why rte_malloc_heap.h is advertised as a public 
interface? It only contains malloc_heap struct which is used internally 
and violates DPDK naming conventions for public struct. I haven't found 
any use of it outside of EAL and it's undocumented. If it is in fact 
public, will it continue to be?

I'd like to use it (and some code in librte_eal/common) for region-based 
allocation in a secondary process for easy memory reclamation in case of 
failure. Is it safe to reuse malloc_heap struct?


-- 

Yerden Zhumabekov

Re: rte_malloc_heap usage scenario

From: Sergio Gonzalez Monroy <hidden>
Date: 2017-03-14 11:53:58

On 09/03/2017 04:48, Yerden Zhumabekov wrote:
Hello,

Can anybody explain why rte_malloc_heap.h is advertised as a public 
interface? It only contains malloc_heap struct which is used 
internally and violates DPDK naming conventions for public struct. I 
haven't found any use of it outside of EAL and it's undocumented. If 
it is in fact public, will it continue to be?
As you point out, the struct name does not follow dpdk conventions for 
public structs, that is how it was historically and was never changed.
IMHO the struct itself is not meant to be public (probably we should add 
some comments) but it needs to be as it is a field in public 'struct 
rte_mem_config' which is also a field in public 'struct rte_config'.

That being said, it doesn't look like rte_mem_config should be a public 
struct at all, although there are a couple of PMDs (virtio_user and ena) 
accessing mem_config info through rte_config.

I cannot guarantee that would remain public, but there should be at 
least a notice in case of any changes.

Sergio
I'd like to use it (and some code in librte_eal/common) for 
region-based allocation in a secondary process for easy memory 
reclamation in case of failure. Is it safe to reuse malloc_heap struct?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help