Revision 1f571426 src/scheduler/src/sched/mm_sched.cc

View differences:

src/scheduler/src/sched/mm_sched.cc
17 17
#include "Scheduler.h"
18 18
#include "SchedulerTemplate.h"
19 19
#include "RankPolicy.h"
20
#include "UserPriorityPolicy.h"
20 21
#include <unistd.h>
21 22
#include <sys/types.h>
22 23
#include <sys/stat.h>
......
32 33
{
33 34
public:
34 35

  
35
    RankScheduler():Scheduler(),rp_host(0),rp_ds(0){};
36
    RankScheduler():Scheduler(),rp_host(0),rp_ds(0),rp_vm(0){};
36 37

  
37 38
    ~RankScheduler()
38 39
    {
39
        if ( rp_host != 0 )
40
        {
41
            delete rp_host;
42
        }
43

  
44
        if ( rp_ds != 0 )
45
        {
46
            delete rp_ds;
47
        }
40
        delete rp_host;
41
        delete rp_ds;
42

  
43
        delete rp_vm;
48 44
    };
49 45

  
50 46
    void register_policies(const SchedulerTemplate& conf)
......
56 52
        rp_ds = new RankDatastorePolicy(dspool, conf.get_ds_policy(), 1.0);
57 53

  
58 54
        add_ds_policy(rp_ds);
55

  
56
        rp_vm = new UserPriorityPolicy(vmpool, 1.0);
57

  
58
        add_vm_policy(rp_vm);
59 59
    };
60 60

  
61 61
private:
62 62
    RankPolicy * rp_host;
63 63
    RankPolicy * rp_ds;
64

  
65
    UserPriorityPolicy * rp_vm;
64 66
};
65 67

  
66 68
int main(int argc, char **argv)

Also available in: Unified diff