summaryrefslogtreecommitdiffstats
path: root/svm
diff options
context:
space:
mode:
Diffstat (limited to 'svm')
-rw-r--r--svm/svm.c34
-rw-r--r--svm/svm.h2
-rw-r--r--svm/svmtool.c2
3 files changed, 19 insertions, 19 deletions
diff --git a/svm/svm.c b/svm/svm.c
index 851baea55ed..e4ca98e1ed2 100644
--- a/svm/svm.c
+++ b/svm/svm.c
@@ -235,9 +235,9 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp)
u8 junk = 0;
uword map_size;
- map_size = rp->virtual_size - (MMAP_PAGESIZE +
- (a->pvt_heap_size ? a->pvt_heap_size :
- SVM_PVT_MHEAP_SIZE));
+ map_size = rp->virtual_size - (MMAP_PAGESIZE +
+ (a->pvt_heap_size ? a->pvt_heap_size :
+ SVM_PVT_MHEAP_SIZE));
if (a->flags & SVM_FLAGS_FILE)
{
@@ -318,8 +318,8 @@ svm_data_region_map (svm_map_region_args_t * a, svm_region_t * rp)
uword map_size;
struct stat statb;
- map_size = rp->virtual_size -
- (MMAP_PAGESIZE
+ map_size = rp->virtual_size -
+ (MMAP_PAGESIZE
+ (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE));
if (a->flags & SVM_FLAGS_FILE)
@@ -368,9 +368,9 @@ svm_data_region_map (svm_map_region_args_t * a, svm_region_t * rp)
}
ASSERT (map_size <= rp->virtual_size
- - (MMAP_PAGESIZE
- +
- (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE)));
+ - (MMAP_PAGESIZE
+ +
+ (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE)));
if (mmap (rp->data_base, map_size, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_FIXED, fd, 0) == MAP_FAILED)
@@ -534,9 +534,9 @@ svm_map_region (svm_map_region_args_t * a)
rp->region_heap =
mheap_alloc_with_flags ((void *) (a->baseva + MMAP_PAGESIZE),
- (a->pvt_heap_size != 0) ?
- a->pvt_heap_size : SVM_PVT_MHEAP_SIZE,
- MHEAP_FLAG_DISABLE_VM);
+ (a->pvt_heap_size != 0) ?
+ a->pvt_heap_size : SVM_PVT_MHEAP_SIZE,
+ MHEAP_FLAG_DISABLE_VM);
oldheap = svm_push_pvt_heap (rp);
rp->region_name = (char *) format (0, "%s%c", a->name, 0);
@@ -550,7 +550,7 @@ svm_map_region (svm_map_region_args_t * a)
vec_validate (rp->bitmap, words - 1);
overhead_space = MMAP_PAGESIZE /* header */ +
- ((a->pvt_heap_size != 0)? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE);
+ ((a->pvt_heap_size != 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE);
bit = 0;
data_base = (uword) rp->virtual_base;
@@ -782,7 +782,7 @@ void
svm_region_init (void)
{
svm_map_region_args_t _a, *a = &_a;
-
+
memset (a, 0, sizeof (*a));
a->root_path = 0;
a->name = SVM_GLOBAL_REGION_NAME;
@@ -799,7 +799,7 @@ void
svm_region_init_chroot (char *root_path)
{
svm_map_region_args_t _a, *a = &_a;
-
+
memset (a, 0, sizeof (*a));
a->root_path = root_path;
a->name = SVM_GLOBAL_REGION_NAME;
@@ -816,7 +816,7 @@ void
svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid)
{
svm_map_region_args_t _a, *a = &_a;
-
+
memset (a, 0, sizeof (*a));
a->root_path = root_path;
a->name = SVM_GLOBAL_REGION_NAME;
@@ -849,7 +849,7 @@ svm_region_find_or_create (svm_map_region_args_t * a)
ASSERT (root_rp);
- a->size += MMAP_PAGESIZE +
+ a->size += MMAP_PAGESIZE +
((a->pvt_heap_size != 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE);
a->size = rnd_pagesize (a->size);
@@ -932,7 +932,7 @@ svm_region_find_or_create (svm_map_region_args_t * a)
a->baseva = root_rp->virtual_base + index * MMAP_PAGESIZE;
rp = svm_map_region (a);
-
+
pool_get (mp->subregions, subp);
name = format (0, "%s%c", a->name, 0);
subp->subregion_name = name;
diff --git a/svm/svm.h b/svm/svm.h
index c42d2b578df..5b95abb66ba 100644
--- a/svm/svm.h
+++ b/svm/svm.h
@@ -117,7 +117,7 @@ void *svm_region_find_or_create (svm_map_region_args_t * a);
void svm_region_init (void);
void svm_region_init_chroot (char *root_path);
void svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid);
-void svm_region_init_args (svm_map_region_args_t *a);
+void svm_region_init_args (svm_map_region_args_t * a);
void svm_region_exit (void);
void svm_region_unmap (void *rp_arg);
void svm_client_scan (char *root_path);
diff --git a/svm/svmtool.c b/svm/svmtool.c
index 2e55a0873e3..b319551425c 100644
--- a/svm/svmtool.c
+++ b/svm/svmtool.c
@@ -247,7 +247,7 @@ svm_existing_region_map_nolock (void *root_arg, svm_map_region_args_t * a)
void *oldheap;
uword *p;
- a->size += MMAP_PAGESIZE +
+ a->size += MMAP_PAGESIZE +
(a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE);
a->size = rnd_pagesize (a->size);