[Simgrid-user] SURF: Allocation of large routing table on GNU C compiler

Kurt Vanmechelen kurt.vanmechelen at ua.ac.be
Tue Jul 22 13:30:28 CEST 2008


I just wanted to point out that in sysdep.h for GNU C compilation, the 
xbt_alloc macros use an unsigned int (4 bytes on my architecture) as an 
argument instead of size_t (8 bytes on my architecture). 

Is there a particular reason for this? I ran into scalability issues because 
of the limited range of the unsigned int. Building the network topology 
resulted in a segmentation fault when adding a new route. Unfortunately, no 
error is displayed as the unsigned int simply wraps around and as a result, 
the allocation of the pointers in the routing table does not throw an error. 
However, the routing table does not contain enough entries in such a case 
which results in the segmentation fault.

For non-GNU C compilation there is no problem as the xbt_malloc macros are 
mapped directly with calloc, malloc etc. through a #define.

Best regards,


Kurt Vanmechelen
Phd Student
Dept. of Mathematics and Computer Sciences
Group CoMP (Computational Modelling and Programming)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen, Belgium

Phone : 03/265 3477
Mail  : kurt.vanmechelen at ua.ac.be

More information about the Simgrid-user mailing list