From: mquinson Date: Sat, 3 Jul 2004 07:41:19 +0000 (+0000) Subject: new function: gras_datadesc_size to allow messaging layer to malloc the needed space X-Git-Tag: v3.3~5194 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/50dfd47984333c254d1ff7d482ee8bb1ced712b5?hp=36950885fdb8e3294c2f1b4bde08dc84743714a7 new function: gras_datadesc_size to allow messaging layer to malloc the needed space git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@152 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/DataDesc/datadesc.c b/src/gras/DataDesc/datadesc.c index 6fc86b2191..f5a41d8a74 100644 --- a/src/gras/DataDesc/datadesc.c +++ b/src/gras/DataDesc/datadesc.c @@ -169,6 +169,16 @@ gras_datadesc_get_id(gras_datadesc_type_t *ddt) { return ddt->code; } +/** + * gras_datadesc_size: + * + * Returns the size occuped by data of this type (on the current arch). + * + */ +int gras_datadesc_size(gras_datadesc_type_t *type) { + return type->size[GRAS_THISARCH]; +} + /** * gras_datadesc_type_dump: *