int xbt_automaton_propositional_symbols_compare_value(const_xbt_dynar_t s1, const_xbt_dynar_t s2)
{
- unsigned int nb_elem = xbt_dynar_length(s1);
+ unsigned long nb_elem = xbt_dynar_length(s1);
- for (unsigned int cursor = 0; cursor < nb_elem; cursor++) {
+ for (unsigned long cursor = 0; cursor < nb_elem; cursor++) {
const int* iptr1 = xbt_dynar_get_ptr(s1, cursor);
const int* iptr2 = xbt_dynar_get_ptr(s2, cursor);
if(*iptr1 != *iptr2)
{
// Update heapinfo about the heapinfo pages (!):
xbt_assert((uintptr_t) mdp->heapinfo % BLOCKSIZE == 0);
- int block = BLOCK(mdp->heapinfo);
+ size_t block = BLOCK(mdp->heapinfo);
size_t nblocks = mdp->heapsize * sizeof(malloc_info) / BLOCKSIZE;
// Mark them as free:
for (size_t j=0; j!=nblocks; ++j) {
/* Full blocks -> Full blocks; see if we can hold it in place. */
blocks = BLOCKIFY(size);
if (blocks < mdp->heapinfo[block].busy_block.size) {
- int it;
+ size_t it;
/* The new size is smaller; return excess memory to the free list. */
for (it= block+blocks; it< mdp->heapinfo[block].busy_block.size ; it++){
mdp->heapinfo[it].type = MMALLOC_TYPE_UNFRAGMENTED; // FIXME that should be useless, type should already be 0 here
/* The new size is the same kind of fragment. */
result = ptr;
- int frag_nb = RESIDUAL(result, BLOCKSIZE) >> type;
+ uintptr_t frag_nb = RESIDUAL(result, BLOCKSIZE) >> type;
mdp->heapinfo[block].busy_frag.frag_size[frag_nb] = requested_size;
mdp->heapinfo[block].busy_frag.ignore[frag_nb] = 0;
SD_task_t task;
sg_host_t *hosts = sg_host_list();
- int totalHosts = sg_host_count();
+ size_t totalHosts = sg_host_count();
qsort((void *) hosts, totalHosts, sizeof(sg_host_t), name_compare_hosts);
xbt_dynar_foreach(dax, cursor, task) {
xbt_dynar_free_container(&route);
}
if (!strcmp(argv[2], "FULL_LINK")) {
- int list_size = sg_host_count();
- for (int i = 0; i < list_size; i++) {
+ size_t list_size = sg_host_count();
+ for (size_t i = 0; i < list_size; i++) {
const_sg_host_t h1 = hosts[i];
const char *name1 = sg_host_get_name(h1);
- for (int j = 0; j < list_size; j++) {
+ for (size_t j = 0; j < list_size; j++) {
const_sg_host_t h2 = hosts[j];
const char *name2 = sg_host_get_name(h2);
fprintf(stderr, "Route between %s and %s\n", name1, name2);
int main(int argc, char ** argv)
{
- size_t M = 8*1024;
- size_t N = 32*1024;
+ const int M = 8 * 1024;
+ const int N = 32 * 1024;
MPI_Init(&argc, &argv);