DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] The type string in the malloc library is unused
@ 2019-09-13 13:32 Morten Brørup
  2019-09-13 19:38 ` Alexander Pshenichnikov
       [not found] ` <CAOaVG17_bhBOfJdvHZOzoVO3t7CXCZCa7f=_Q=_Pi5jgnY3GzA@mail.gmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Morten Brørup @ 2019-09-13 13:32 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Olivier Matz, Andrew Rybchenko, dev

Hi Anatoly,

 

The functions in the DPDK malloc library takes a "type" parameter (a string, supposedly for debug purposes), but the underlying malloc_heap functions (which take the same string parameter) don't store or use this string for anything.

 

Is the intention to implement this sometime in the future, or should it be considered for removal?

 

I was originally looking for a function for my primary process to allocate a block of named memory in the huge-page area, so my secondary process could look it up and use it. And I would simply use a unique type string for this, and add an rte_malloc_lookup function. However, that obviously doesn't work when the type parameter is not used during allocation.

 

 

The simplest workaround I can come up with is using a named mempool with a single element, where this element is my memory block. I get an element from this mempool to find the address of my memory block, store the address, and put the element back in the mempool, so the secondary process can get the address the same way, i.e. by getting and putting the element back into the mempool while storing the element's address underway.

 

Any better ideas?

 

 

Med venlig hilsen / kind regards

 

Morten Brørup

CTO

 

 

SmartShare Systems A/S

Tonsbakken 16-18

DK-2740 Skovlunde

Denmark

 

Office      +45 70 20 00 93

Direct      +45 89 93 50 22

Mobile     +45 25 40 82 12

 

mb@smartsharesystems.com <mailto:mb@smartsharesystems.com> 

www.smartsharesystems.com <https://www.smartsharesystems.com/> 

 


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

end of thread, other threads:[~2019-09-14 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-13 13:32 [dpdk-dev] The type string in the malloc library is unused Morten Brørup
2019-09-13 19:38 ` Alexander Pshenichnikov
2019-09-14  7:06   ` Morten Brørup
     [not found] ` <CAOaVG17_bhBOfJdvHZOzoVO3t7CXCZCa7f=_Q=_Pi5jgnY3GzA@mail.gmail.com>
2019-09-14  8:29   ` Morten Brørup

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 NNTP newsgroup(s).