tableau etat[0..M] de (LIBRE, OCCUPE)
i:=0; (mais on peut commencer n'importe ou)
trouve := faux;
k:=0;
tant que i < N et non trouve faire
si etat[i] = LIBRE alors
si k=0 alors j:=i; finsi (repere de zone)
k:=k+1;
trouve := k = p; (zone de taille insufisante)
sinon k:=0;
finsi;
i:=i+1;
fait;
si trouve alors allouer de j a j+p-1 sinon impossible finsi;
Alain Bouju Programmation Système et réseaux