-int mmalloc_compare_mdesc(struct mdesc *mdp1, struct mdesc *mdp2, void *std_heap_addr){
-
- int errors = 0;
-
- if(mdp1->headersize != mdp2->headersize){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different size of the file header for the mapped files");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->refcount != mdp2->refcount){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different number of processes that attached the heap");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(strcmp(mdp1->magic, mdp2->magic) != 0){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different magic number");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->flags != mdp2->flags){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different flags");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->heapsize != mdp2->heapsize){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different number of info entries");
- errors++;
- }else{
- return 1;
- }
- }
-
- //XBT_DEBUG("Heap size : %zu", mdp1->heapsize);
-
- if(mdp1->heapbase != mdp2->heapbase){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different first block of the heap");
- errors++;
- }else{
- return 1;
- }
- }
-
-
- if(mdp1->heapindex != mdp2->heapindex){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different index for the heap table : %zu - %zu", mdp1->heapindex, mdp2->heapindex);
- errors++;
- }else{
- return 1;
- }
- }
-
- //XBT_DEBUG("Heap index : %zu", mdp1->heapindex);
-
- if(mdp1->base != mdp2->base){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different base address of the memory region");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->breakval != mdp2->breakval){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different current location in the memory region");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->top != mdp2->top){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different end of the current location in the memory region");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->heaplimit != mdp2->heaplimit){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different limit of valid info table indices");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->fd != mdp2->fd){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different file descriptor for the file to which this malloc heap is mapped");
- errors++;
- }else{
- return 1;
- }
- }
-
- if(mdp1->saved_errno != mdp2->saved_errno){
- if(XBT_LOG_ISENABLED(xbt_mm_legacy, xbt_log_priority_debug)){
- XBT_DEBUG("Different errno");
- errors++;
- }else{
- return 1;
- }
- }