summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-05-09 12:08:06 -0700
committerDave Barach <openvpp@barachs.net>2019-05-09 20:36:14 +0000
commit404b8a36e737e2911ca8874363a4e87cb707e5f9 (patch)
treef1388afdb67309754074e98f72dfc9afb645e0c4 /src/svm
parent7d31ab2a5cc2124ddd973ac5dfac2219619f345a (diff)
session: segment manager fixes
- fix segment size rounding for 4GB segments - fix initialization of first segment size - cleanup fifo segment info retrieval Change-Id: I5ebf20f71ea797087653e7e76fa2e37b2686ec40 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/fifo_segment.c19
-rw-r--r--src/svm/ssvm.c1
2 files changed, 3 insertions, 17 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 758b2648ece..fdbc8102587 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -190,23 +190,8 @@ fifo_segment_get_segment (fifo_segment_main_t * sm, u32 segment_index)
void
fifo_segment_info (fifo_segment_t * seg, char **address, size_t * size)
{
- if (ssvm_type (&seg->ssvm) == SSVM_SEGMENT_PRIVATE)
- {
-#if USE_DLMALLOC == 0
- mheap_t *heap_header;
-
- *address = pointer_to_uword (seg->ssvm.sh->heap);
- heap_header = mheap_header (seg->ssvm.sh->heap);
- *size = heap_header->max_size;
-#else
- mspace_get_address_and_size (seg->ssvm.sh->heap, address, size);
-#endif
- }
- else
- {
- *address = (char *) seg->ssvm.sh->ssvm_va;
- *size = seg->ssvm.ssvm_size;
- }
+ *address = (char *) seg->ssvm.sh->ssvm_va;
+ *size = seg->ssvm.ssvm_size;
}
void
diff --git a/src/svm/ssvm.c b/src/svm/ssvm.c
index 59a5d228957..3e45175da0e 100644
--- a/src/svm/ssvm.c
+++ b/src/svm/ssvm.c
@@ -383,6 +383,7 @@ ssvm_master_init_private (ssvm_private_t * ssvm)
clib_memset (sh, 0, sizeof (*sh));
sh->heap = heap;
+ sh->ssvm_va = pointer_to_uword (heap);
sh->type = SSVM_SEGMENT_PRIVATE;
return 0;