Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fields already initialized by constructor of the base class Storage.
[simgrid.git] / src / surf / storage_n11.cpp
index 4d47d60..600cca1 100644 (file)
@@ -1,11 +1,8 @@
 #include "storage_n11.hpp"
 #include "surf_private.h"
 
-#define __STDC_FORMAT_MACROS
-
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
 
-
 static int storage_selective_update = 0;
 static xbt_swag_t storage_running_action_set_that_does_not_need_being_checked = NULL;
 
@@ -29,10 +26,6 @@ static XBT_INLINE void surf_storage_resource_free(void *r)
 {
   // specific to storage
   StoragePtr storage = dynamic_cast<StoragePtr>(static_cast<ResourcePtr>(r));
-  xbt_dict_free(&storage->p_content);
-  xbt_dynar_free(&storage->p_writeActions);
-  free(storage->p_typeId);
-  free(storage->p_contentType);
   // generic resource
   delete storage;
 }
@@ -254,9 +247,8 @@ StoragePtr StorageN11Model::createResource(const char* id, const char* type_id,
 
   xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, static_cast<ResourcePtr>(storage));
 
-  XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s' \n\t\tmodel '%s' \n\t\tproperties '%p'\n\t\tBread '%f'\n",
+  XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tproperties '%p'\n\t\tBread '%f'\n",
       id,
-      this,
       type_id,
       storage_type->properties,
       Bread);
@@ -362,17 +354,9 @@ StorageN11Lmm::StorageN11Lmm(StorageModelPtr model, const char* name, xbt_dict_t
     StorageLmm(maxminSystem, bread, bwrite, bconnection, type_id, content_name, content_type, size) {
   XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
 
-  p_stateCurrent = SURF_RESOURCE_ON;
-  m_usedSize = 0;
-  m_size = 0;
-
-  p_content = parseContent(content_name);
-  p_contentType = content_type;
   p_constraint = lmm_constraint_new(maxminSystem, this, bconnection);
   p_constraintRead  = lmm_constraint_new(maxminSystem, this, bread);
   p_constraintWrite = lmm_constraint_new(maxminSystem, this, bwrite);
-  m_size = size;
-  p_typeId = xbt_strdup(type_id);
 }
 
 StorageActionPtr StorageN11Lmm::ls(const char* path)