debuggers.hg
diff xen/common/ac_timer.c @ 3658:0ef6e8e6e85d
bitkeeper revision 1.1159.212.71 (4200f0afX_JumfbEHQex6TdFENULMQ)
Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author | iap10@labyrinth.cl.cam.ac.uk |
---|---|
date | Wed Feb 02 15:24:31 2005 +0000 (2005-02-02) |
parents | d0353c3d3ebd beb0887c54bc |
children | bbe8541361dd 4294cfa9fad3 |
line diff
1.1 --- a/xen/common/ac_timer.c Wed Feb 02 09:38:32 2005 +0000 1.2 +++ b/xen/common/ac_timer.c Wed Feb 02 15:24:31 2005 +0000 1.3 @@ -130,7 +130,7 @@ static int add_entry(struct ac_timer **h 1.4 if ( unlikely(sz == GET_HEAP_LIMIT(heap)) ) 1.5 { 1.6 int i, limit = (GET_HEAP_LIMIT(heap)+1) << 1; 1.7 - struct ac_timer **new_heap = xmalloc(limit*sizeof(struct ac_timer *)); 1.8 + struct ac_timer **new_heap = xmalloc_array(struct ac_timer *, limit); 1.9 if ( new_heap == NULL ) BUG(); 1.10 memcpy(new_heap, heap, (limit>>1)*sizeof(struct ac_timer *)); 1.11 for ( i = 0; i < smp_num_cpus; i++ ) 1.12 @@ -278,8 +278,7 @@ void __init ac_timer_init(void) 1.13 1.14 for ( i = 0; i < smp_num_cpus; i++ ) 1.15 { 1.16 - ac_timers[i].heap = xmalloc( 1.17 - (DEFAULT_HEAP_LIMIT+1) * sizeof(struct ac_timer *)); 1.18 + ac_timers[i].heap = xmalloc_array(struct ac_timer *, DEFAULT_HEAP_LIMIT+1); 1.19 if ( ac_timers[i].heap == NULL ) BUG(); 1.20 SET_HEAP_SIZE(ac_timers[i].heap, 0); 1.21 SET_HEAP_LIMIT(ac_timers[i].heap, DEFAULT_HEAP_LIMIT);