1 /* xbt.h - Public interface to the xbt (simgrid's toolbox) */
3 /* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include <simgrid/config.h>
13 #include <xbt/dynar.h>
19 /** Cache the size of a memory page for the current system. */
20 XBT_PUBLIC_DATA int xbt_pagesize;
22 /** Cache the number of bits of addresses inside a given page, log2(xbt_pagesize). */
23 XBT_PUBLIC_DATA int xbt_pagebits;
25 /** Helps ensuring that header version (SIMGRID_VERSION_MAJOR and friends) and dynamic library version do match. */
26 XBT_PUBLIC void sg_version_check(int lib_version_major, int lib_version_minor, int lib_version_patch);
28 /** Contains all the parameters we got from the command line */
29 XBT_PUBLIC_DATA xbt_dynar_t sg_cmdline;
31 /* snprintf related functions */
32 /** @addtogroup XBT_str
35 /** @brief print to allocated string
37 * Similar to vasprintf(), but returns a pointer to the newly created string (or aborts on error).
39 XBT_PUBLIC char* bvprintf(const char* fmt, va_list ap);
40 /** @brief print to allocated string
42 * Similar to asprintf(), but returns a pointer to the newly created string (or aborts on error).
44 XBT_PUBLIC char* bprintf(const char* fmt, ...) XBT_ATTRIB_PRINTF(1, 2);
49 #endif /* XBT_MISC_H */