From 50dfd47984333c254d1ff7d482ee8bb1ced712b5 Mon Sep 17 00:00:00 2001 From: mquinson Date: Sat, 3 Jul 2004 07:41:19 +0000 Subject: [PATCH 1/1] 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 --- src/gras/DataDesc/datadesc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: * -- 2.20.1