// -----------------------------------------------------------------------
-// Copyright (C) 2006 - 2007 FRESCOR consortium partners:
+// Copyright (C) 2006 - 2009 FRESCOR consortium partners:
//
// Universidad de Cantabria, SPAIN
// University of York, UK
// Visual Tools S.A. SPAIN
// Rapita Systems Ltd UK
// Evidence ITALY
-//
+//
// See http://www.frescor.org for a link to partners' websites
//
// FRESCOR project (FP6/2005/IST/5-034026) is funded
//
//
// based on previous work (FSF) done in the FIRST project
-//
+//
// Copyright (C) 2005 Mälardalen University, SWEDEN
// Scuola Superiore S.Anna, ITALY
// Universidad de Cantabria, SPAIN
// FSF API web pages: http://marte.unican.es/fsf/docs
// http://shark.sssup.it/contrib/first/docs/
//
-// This file is part of FRSH API
-//
-// FRSH API is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2, or (at your option)
-// any later version.
-//
-// FRSH API is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
+// This file is part of FRSH (FRescor ScHeduler)
//
-// You should have received a copy of the GNU General Public License
-// distributed with FRSH API; see file COPYING. If not, write to the
-// Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-// 02111-1307, USA.
+// FRSH is free software; you can redistribute it and/or modify it
+// under terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option) any
+// later version. FRSH is distributed in the hope that it will be
+// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details. You should have received a
+// copy of the GNU General Public License along with FRSH; see file
+// COPYING. If not, write to the Free Software Foundation, 675 Mass Ave,
+// Cambridge, MA 02139, USA.
//
-// As a special exception, if you include this header file into source
-// files to be compiled, this header file does not by itself cause
-// the resulting executable to be covered by the GNU General Public
-// License. This exception does not however invalidate any other
-// reasons why the executable file might be covered by the GNU General
-// Public License.
+// As a special exception, including FRSH header files in a file,
+// instantiating FRSH generics or templates, or linking other files
+// with FRSH objects to produce an executable application, does not
+// by itself cause the resulting executable application to be covered
+// by the GNU General Public License. This exception does not
+// however invalidate any other reasons why the executable file might be
+// covered by the GNU Public License.
// -----------------------------------------------------------------------
//frsh_memory_management.h
**/
/**
- * frsh_contract_set_memory_reqs()
+ * frsh_contract_set_min_memory()
*
- * This function specifies in the contract the minimum and maximum
+ * This function specifies in the contract the minimum
* memory needed by the application.
*
* @param[in] min_memory Minimum needed memory in bytes.
* @param contract Contract, in-out argument.
*
* @return 0 if no error \n
- * FRSH_ERR_BAD_ARGUMENT if min_memory > max_memory
+ * FRSH_ERR_BAD_ARGUMENT if min_memory <0
*
**/
-int frsh_contract_set_memory_reqs(size_t min_memory,
- size_t max_memory,
+int frsh_contract_set_min_memory(size_t min_memory,
frsh_contract_t *contract);
/**
- * frsh_contract_get_memory_reqs()
+ * frsh_contract_get_min_memory()
*
- * This function gets the memory parameters from the contract.
+ * This function gets the minimum memory parameter from the contract.
*
* @param[in] contract Contract object
* @param[out] min_memory Placeholder for the minimum required
* memory.
+ *
+ * @return 0 if no error \n
+ * FRSH_ERR_BAD_ARGUMENT if one of the pointers is NULL
+ **/
+int frsh_contract_get_min_memory(const frsh_contract_t *contract,
+ size_t *min_memory);
+
+// frsh_contract_set_max_memory() is new
+// frsh_contract_get_max_memory() is new
+
+/**
+ * frsh_contract_set_max_memory()
+ *
+ * This function specifies in the contract the minimum
+ * memory needed by the application.
+ *
+ * @param[in] max_memory Maximum needed memory in bytes.
+ * @param contract Contract, in-out argument.
+ *
+ * FRSH_ERR_BAD_ARGUMENT if min_memory > max_memory
+ *
+ **/
+int frsh_contract_set_max_memory(size_t max_memory,
+ frsh_contract_t *contract);
+
+
+/**
+ * frsh_contract_get_max_memory()
+ *
+ * This function gets the maximum memory parameter from the contract.
+ *
+ * @param[in] contract Contract object
* @param[out] max_memory Placeholder for the maximum required
* memory.
*
* @return 0 if no error \n
* FRSH_ERR_BAD_ARGUMENT if one of the pointers is NULL
**/
-int frsh_contract_get_memory_reqs(const frsh_contract_t *contract,
- size_t *min_memory,
+int frsh_contract_get_max_memory(const frsh_contract_t *contract,
size_t *max_memory);