int allouer(char name[20],int taille){
     struct zone_alloc *zone;
     zone=pop_freelist(name,taille);
     
     if(zone==NULL){
       printf("allouer:memoire inssifusant\n");
       return-1;             
     }
         
     
     push_alloclist(zone);
     return zone->adresse;           
 }
예제 #2
0
파일: timer.c 프로젝트: conght/BLM-Lib
static pj_status_t schedule_entry( pj_timer_heap_t *ht,
				   pj_timer_entry *entry, 
				   const pj_time_val *future_time )
{
    if (ht->cur_size < ht->max_size)
    {
	// Obtain the next unique sequence number.
	// Set the entry
	entry->_timer_id = pop_freelist(ht);
	entry->_timer_value = *future_time;
	insert_node( ht, entry);
	return 0;
    }
    else
	return -1;
}