Skip to content

Commit

Permalink
bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinites committed Mar 27, 2020
1 parent 8c34698 commit 4cfd517
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions LinuxMemoryManager/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
#include <errno.h>
#include "css.h"

#undef __USE_MMAP__
#define __USE_BRK__
#define __USE_MMAP__
#undef __USE_BRK__
#undef __USE_GLIBC__

static vm_page_for_families_t *first_vm_page_for_families = NULL;
Expand Down Expand Up @@ -707,9 +707,7 @@ mm_print_memory_usage(char *struct_name){
memory_app_use_to_total_memory_ratio);

printf("Total Memory being used by Memory Manager = %lu Bytes\n",
((cumulative_vm_pages_claimed_from_kernel *\
SYSTEM_PAGE_SIZE) +
(number_of_struct_families * sizeof(vm_page_family_t))));
cumulative_vm_pages_claimed_from_kernel * SYSTEM_PAGE_SIZE);
}

void
Expand Down
6 changes: 3 additions & 3 deletions data_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,10 +1597,10 @@ ping(char *node_name, char *dst_prefix){
if(IS_MPLS_LABEL_STACK_EMPTY(mpls_label_stack)){
/* Auto Done : :D :
* Get the prefix from mpls_label_stack and feed it to Ist pref order to next_node*/
XFREE_mpls_label_stack(mpls_label_stack);
free_mpls_label_stack(mpls_label_stack);
}
else{
XFREE_mpls_label_stack(mpls_label_stack);
free_mpls_label_stack(mpls_label_stack);
return -1;
}
}
Expand Down Expand Up @@ -1637,7 +1637,7 @@ get_new_mpls_label_stack(){
}

void
XFREE_mpls_label_stack(mpls_label_stack_t *mpls_label_stack){
free_mpls_label_stack(mpls_label_stack_t *mpls_label_stack){

free_stack(mpls_label_stack->stack);
XFREE(mpls_label_stack);
Expand Down
2 changes: 1 addition & 1 deletion spfclihandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ debug_trace_mpls_stack_label(param_t *param, ser_buff_t *tlv_buf, op_mode enable

node = (node_t *)singly_ll_search_by_key(instance->instance_node_list, node_name);
transient_mpls_pfe_engine(node, mpls_label_stack, &next_node);
XFREE_mpls_label_stack(mpls_label_stack);
free_mpls_label_stack(mpls_label_stack);
return 0;
}

Expand Down

0 comments on commit 4cfd517

Please sign in to comment.