* [dpdk-dev] [PATCH] memzone: document reserving zero-length memzones
@ 2018-05-03 16:25 Anatoly Burakov
2018-05-14 0:01 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Anatoly Burakov @ 2018-05-03 16:25 UTC (permalink / raw)
To: dev
Currently, reserving a memzone with length set to 0 will not trigger
any memory allocations, and memzone will instead be looking through
already allocated memory only. Document this limitation.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/common/include/rte_memzone.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/librte_eal/common/include/rte_memzone.h b/lib/librte_eal/common/include/rte_memzone.h
index 0eeb94f..a4c9bd6 100644
--- a/lib/librte_eal/common/include/rte_memzone.h
+++ b/lib/librte_eal/common/include/rte_memzone.h
@@ -77,6 +77,10 @@ struct rte_memzone {
* correctly filled memzone descriptor. If the allocation cannot be
* done, return NULL.
*
+ * @note Reserving memzones with len set to 0 will only attempt to allocate
+ * memzones from memory that is already available. It will not trigger any
+ * new allocations.
+ *
* @param name
* The name of the memzone. If it already exists, the function will
* fail and return NULL.
@@ -130,6 +134,10 @@ const struct rte_memzone *rte_memzone_reserve(const char *name,
* descriptor. If the allocation cannot be done or if the alignment
* is not a power of 2, returns NULL.
*
+ * @note Reserving memzones with len set to 0 will only attempt to allocate
+ * memzones from memory that is already available. It will not trigger any
+ * new allocations.
+ *
* @param name
* The name of the memzone. If it already exists, the function will
* fail and return NULL.
@@ -188,6 +196,10 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name,
* boundary. That implies that requested length should be less or equal
* then boundary.
*
+ * @note Reserving memzones with len set to 0 will only attempt to allocate
+ * memzones from memory that is already available. It will not trigger any
+ * new allocations.
+ *
* @param name
* The name of the memzone. If it already exists, the function will
* fail and return NULL.
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] memzone: document reserving zero-length memzones
2018-05-03 16:25 [dpdk-dev] [PATCH] memzone: document reserving zero-length memzones Anatoly Burakov
@ 2018-05-14 0:01 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2018-05-14 0:01 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev
03/05/2018 18:25, Anatoly Burakov:
> Currently, reserving a memzone with length set to 0 will not trigger
> any memory allocations, and memzone will instead be looking through
> already allocated memory only. Document this limitation.
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-14 0:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 16:25 [dpdk-dev] [PATCH] memzone: document reserving zero-length memzones Anatoly Burakov
2018-05-14 0:01 ` Thomas Monjalon
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).