X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e6692e68ddfe1ef3234cacab53edb44277ae4405..2995193b7e30d03c04917852c4c0b26d26646273:/src/xbt/swag.c diff --git a/src/xbt/swag.c b/src/xbt/swag.c index 5374dc118d..6971730eb5 100644 --- a/src/xbt/swag.c +++ b/src/xbt/swag.c @@ -15,6 +15,16 @@ #include "xbt/error.h" #include "xbt/swag.h" +/** \defgroup XBT_swag A O(1) set datatype + * \brief a O(1) set based on linked lists + * + * Warning, this module is done to be efficient and performs tons of + * cast and dirty things. So avoid using it unless you really know + * what you are doing. It is basically a fifo but with restrictions so that + * it can be used as a set. Any operation (add, remove, belongs) is O(1) and + * no call to malloc/free is done. + */ + XBT_LOG_NEW_DEFAULT_SUBCATEGORY(swag,xbt,"Swag : O(1) set library"); #define PREV(obj,offset) xbt_swag_getPrev(obj,offset) @@ -48,7 +58,7 @@ xbt_swag_t xbt_swag_new(size_t offset) */ void xbt_swag_free(xbt_swag_t swag) { - xbt_free(swag); + free(swag); } /** Creates a new swag.