summaryrefslogtreecommitdiffstats
path: root/src/svm/fifo_segment.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-12-07 14:33:58 -0800
committerFlorin Coras <florin.coras@gmail.com>2020-12-23 02:27:52 +0000
commit213b1bb3b9652ce2937e3b47573cc54ee3008387 (patch)
tree0445b51256183db2c8593390a1f95e0234dbffc6 /src/svm/fifo_segment.h
parent0da8168423349dfb1852d4708d67014de36748b8 (diff)
svm: remove fifo segment heap
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I518e096fe13847759806ff62009e73fd8f7451b7
Diffstat (limited to 'src/svm/fifo_segment.h')
-rw-r--r--src/svm/fifo_segment.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/svm/fifo_segment.h b/src/svm/fifo_segment.h
index d3ce59c81b5..39c94548636 100644
--- a/src/svm/fifo_segment.h
+++ b/src/svm/fifo_segment.h
@@ -67,6 +67,7 @@ typedef struct
{
ssvm_private_t ssvm; /**< ssvm segment data */
fifo_segment_header_t *h; /**< fifo segment data */
+ uword max_byte_index;
u8 n_slices; /**< number of fifo segment slices */
} fifo_segment_t;
@@ -206,6 +207,14 @@ u8 fsh_has_reached_mem_limit (fifo_segment_header_t * fsh);
void fsh_reset_mem_limit (fifo_segment_header_t * fsh);
/**
+ * Fifo segment reset mem limit flag
+ *
+ * @param fs fifo segment
+ * @param size size requested
+ * @return pointer to memory allocated or 0
+ */
+void *fifo_segment_alloc (fifo_segment_t *fs, uword size);
+/**
* Fifo segment allocated size
*
* Returns fifo segment's allocated size
@@ -228,16 +237,6 @@ uword fifo_segment_size (fifo_segment_t * fs);
uword fifo_segment_free_bytes (fifo_segment_t * fs);
/**
- * Update fifo segment free bytes estimate
- *
- * Forces fifo segment free bytes estimate synchronization with underlying
- * memory allocator.
- *
- * @param fs fifo segment
- */
-void fifo_segment_update_free_bytes (fifo_segment_t * fs);
-
-/**
* Fifo segment number of cached bytes
*
* Returns fifo segment's number of cached bytes.